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

Override custom dimension value on posting sales invoice in X++

 Requirement: 1. Override custom dimension value on posting sales invoice 2.  Ledger posting type as "Cost of goods, invoiced" ...