AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 06.05.2011, 02:19   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
kamalblogs: Creating a custom compiler output type and displaying in the compiler output in Dynamics Ax 2009
Источник: http://kamalblogs.wordpress.com/2011...amics-ax-2009/
==============

This article will guide in creating a custom compiler output Type like “To Do” , “Error” and “Best Practices” in Dynamics Ax 2009.

0. First change your compiler to “Message window” until you complete this. Retaining it as “Form” might result in runtime errors which cannot be resolved. This is because it will stop your compiler from executing and consequently any further progress.

1. Add a element to the enum “SysCompilerOutput”. Let’s call it “Custom”



2. Add a new datasource to the Form “SysCompilerOutput” for the table “TmpCompilerOutput”. Name it “Custom”. Also create a tab, grid and drag fields to it.



3. Now override the “init” method of the datasource and write the following code.

X++:
public void init()
{
    QueryBuildRange range;
    ;

    super();
    range = this.query().dataSourceNo(1).addRange(fieldnum(TmpCompilerOutput, SysCompilerOutputTab));
    range.value(queryValue(SysCompilerOutputTab::Custom));
    range.status(RangeStatus::Hidden);
}
4. Go to class “\Classes\SysCompilerOutput” and create a global variable “Custom_Ds” and create a parm method for this datasource like “\Classes\SysCompilerOutput\parmBestPractices_ds

5. Go to “\Classes\SysCompilerOutput\updateDataSources ” and add the following lines

X++:
        this.updateCursor(custom_ds, tmpCompilerOutput);
        custom_ds.research();
6. Now change your compiler output to “Form”

7. Run the following Job to test it.

X++:
static void JobTestCompiler(Args _args)
{
    SysCompileroutput     output;
    ;
 
    output = infolog.compilerOutput();
 
    output.compilerOutputMessage('Custom Message 1', 66, 1, 2, 3, 'Just a try', 'Method name', SysCompilerOutputTab::Custom);
    output.compilerOutputMessage('Custom Message 2', 85, 1, 2, 3, 'Second Try', 'Property name', SysCompilerOutputTab::Custom);
}
8. Now you can make the above call from any place in the application to add contents to the compiler output tab.

**Just a note, This is only to start with it. You may want to setup your own custom error messages, error codes, images. You have to explore forward from here to accomplish those.**




Источник: http://kamalblogs.wordpress.com/2011...amics-ax-2009/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 06.05.2011, 08:04   #2  
online
S.Kuskov
Участник
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
3,429 / 1772 (66) ++++++++
Регистрация: 28.04.2007
Адрес: Калуга
Прикольно. Ещё правда не придумал как это можно применить, но прикольно!
Старый 06.05.2011, 21:50   #3  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
Ага. Вот именно это я тоже подумал. Прикольно, но непонятно, как применить
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Custom Charting Capabilities in Microsoft Dynamics CRM 2011 Blog bot Dynamics CRM: Blogs 0 19.01.2011 21:11
Kashperuk Ivan: UtcDateTime in Dynamics AX 2009 Blog bot DAX Blogs 0 17.02.2010 15:05
Muhammad Ali Khan: Relating/Connecting MS CRM 4.0 Data With Custom External Content Type Data In SharePoint 2010 Blog bot Dynamics CRM: Blogs 0 04.02.2010 13:05
casperkamal: Creating custom Picking list in Dynamics - Part II Blog bot DAX Blogs 0 22.03.2007 21:41
casperkamal: HTML based Report in Dynamics Ax Blog bot DAX Blogs 0 20.02.2007 09:40
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:47.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.