Monday, August 28, 2017

Get Table Field Name and Field Properties AX 2012

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

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...