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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...