17.11.2012, 11:12 | #1 |
Участник
|
axtadka: Adding a field on dialog by addfield() method, when the type of EDT is known at run time, in Dynamics AX 2009
Источник: http://axtadka.blogspot.com/2011/01/...-addfield.html
============== Possible situations when: 1.EDT type is fixed and is known at design time. public Object dialog() { DialogRunbase dialog = super(); ; dlgTransDate = dialog.addField(typeid(CustAccount)); return dialog; } 2. EDT Name is known in some situation. public Object dialog() { DialogRunbase dialog; Str edtName = “CustAccount”; ; dialog = super(); dialog.addField(new sysDictType(new Dictionary().typeName2Id(edtName)).extendedTypeId()); return dialog; } 3. EDT Name is not known at design time, but is known at Run time from a table field. public Object dialog() { DialogRunbase dialog; str edtName; dictField dictField; ; dialog = super(); dictField = new DictField(tablenum(CustTable),fieldnum(CustTable, AccountNum)); edtName = extendedTypeId2name(dictField.typeId()); //Get the EDT information from field of a table. Here Field AccountNum from table CustTable //has been taken for example. dialog.addField(new sysDictType(new dictionary().typeName2Id(edtName)).extendedTypeId()); return dialog; } Источник: http://axtadka.blogspot.com/2011/01/...-addfield.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|