Thursday, June 5, 2014

Table Creation through X++ code in AX 2012

// Table Creation through X++ code in AX 2012

Static void newTablewithField(args_args)

{

TreeNode                           treenode;

AOTTableFieldList              fieldlist;

#AOT

;

treenode = TreeNode   ::findNode(#TablePath);

treeNode.AoTadd("TableName");

sqlDataDictionary::Synchronize();

treeNode.AoTFindChild(TableName);

filedlist = treenode::AOTfieldchild(TableName).AOTfindchild('Fileds');

fieldList.addString('FieldName');

fieldList.addInteger('FieldName');

fieldList.addReal('FieldName');

info( "Table Created");

}

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...