|
25.06.2011, 06:33 | #1 |
Участник
|
axaptapedia: Table Field Group
Источник: http://www.axaptapedia.com/Table_Field_Group
============== Summary: === Description === The following demonstrates how to add field group fields with code. [[Image:FieldGroup.png|Before]] === Dynamics AX versions === Has been tested on [[Build_numbers|Dynamics AX 2009 SP1 RU-6]] === Code === #AOT #define.FieldGroups('Field Groups') #define.TableFieldGroupItem('PROPERTIES\nTable\n#\%1\nDataField\n#\%2\nENDPROPERTIES') TreeNode table, fieldGroups, fieldGroup, field; ; // Gets the Address table. table = TreeNode::findNode(#TablesPath + #AOTDelimiter + tableStr(Address)); // Gets the Address table's Field Groups node. fieldGroups = table.AOTfindChild(#FieldGroups); // Gets the 'Delivery' field group. fieldGroup = fieldGroups.AOTfindChild(tableFieldGroupStr(Address, Delivery)); // Adds the field 'Name' to the 'Delivery' field group. fieldGroup.AOTadd(fieldStr(Address, Name)); // Adds the display method 'tableRelationName' to the 'Delivery field group. // This uses the Address table's RecVersion field as a dummy and converts it // to a display field by setting its properties. field = fieldGroup.AOTadd(fieldStr(Address, RecVersion)); field.AOTSetProperties(strFmt( #TableFieldGroupItem, tableStr(Address), tablemethodstr(Address, tableRelationName))); // Saves the changes to the table. table.AOTsave(); Источник: http://www.axaptapedia.com/Table_Field_Group
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|