Created
May 27, 2015 01:50
-
-
Save petersonfs/1bab3c8fd90a076ab010 to your computer and use it in GitHub Desktop.
Loop table fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void loopTableFields(Args _args) | |
{ | |
SysDictTable dictTable = new SysDictTable(tableNum(PurchLine)); | |
SysDictField dictField; | |
TreeNode treeNode; | |
FieldId fieldId = dictTable.fieldNext(0); | |
while (fieldId) | |
{ | |
dictField = dictTable.fieldObject(fieldId); | |
if (dictField.isSql() && !dictField.isSystem()) | |
{ | |
treeNode = dictField.treeNode(); | |
info(strFmt("%1 | %2 | %3", | |
dictField.name(), // Field name | |
treeNode.AOTgetProperty("Label"), // Label id | |
SysLabel::labelId2String(treeNode.AOTgetProperty("Label")))); // Label string | |
} | |
fieldId = dictTable.fieldNext(fieldId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment