//Get Table Field Name and Field Properties AX 2012
SysDictTable dictTable = new SysDictTable(tableNum(yourTable));
SysDictField dictField;
TreeNode treeNode;
TmpTable tempTableChk;
FieldId fieldId = dictTable.fieldNext(0);
while (fieldId)
{
dictField = dictTable.fieldObject(fieldId);
if (dictField.isSql() && !dictField.isSystem() && dictField.name() != "Modified")
{
treeNode = dictField.treeNode();
tempTableChk.Field = dictField.name();
tempTableChk.Label = treeNode.AOTgetProperty("Label");
tempTableChk.insert();
}
fieldId = dictTable.fieldNext(fieldId);
}
SysDictTable dictTable = new SysDictTable(tableNum(yourTable));
SysDictField dictField;
TreeNode treeNode;
TmpTable tempTableChk;
FieldId fieldId = dictTable.fieldNext(0);
while (fieldId)
{
dictField = dictTable.fieldObject(fieldId);
if (dictField.isSql() && !dictField.isSystem() && dictField.name() != "Modified")
{
treeNode = dictField.treeNode();
tempTableChk.Field = dictField.name();
tempTableChk.Label = treeNode.AOTgetProperty("Label");
tempTableChk.insert();
}
fieldId = dictTable.fieldNext(fieldId);
}
No comments:
Post a Comment