// 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");
}
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