| Mohammed 的个人资料Dynamics AX日志留言簿网络 | 帮助 |
|
|
8月10日 Add Fields to a table, using code.... not the AOT.. In Dynamics AX
static void createFieldFromCode(Args _args) { #AOT TreeNode tableNode; AotTableFieldList myAOTTablefieldList; SysDictTable sysDictTable = new SysDictTable(tablenum(moDocuref)); ; if (! hasSecuritykeyAccess(securitykeynum(SysDevelopment), AccessType::View)) { return; } myAOTTablefieldList = new AotTableFieldList(); tableNode = TreeNode::findNode(#TablesPath+'\\'+sysDictTable.name()); myAOTTablefieldList = TreeNode::findNode(#TablesPath+'\\'+sysDictTable.name() + "\\Fields"); if(!myAOTTablefieldList.AOTfindChild("newField")) // check if the field alredy exists { myAOTTablefieldList.addString("newField"); } tableNode.AOTsave(); }
Technorati Tags: Dynamics AX 引用通告此日志的引用通告 URL 是: http://dynamic-ax.spaces.live.com/blog/cns!13619E6948204DE3!340.trak 引用此项的网络日志
|
|
|