06.05.2011, 02:19 | #1 |
Участник
|
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); } 5. Go to “\Classes\SysCompilerOutput\updateDataSources ” and add the following lines X++: this.updateCursor(custom_ds, tmpCompilerOutput); custom_ds.research(); 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); } **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 |
Участник
|
Прикольно. Ещё правда не придумал как это можно применить, но прикольно!
|
|
06.05.2011, 21:50 | #3 |
Участник
|
Ага. Вот именно это я тоже подумал. Прикольно, но непонятно, как применить
|
|
|
|