Skip to content

Instantly share code, notes, and snippets.

@petersonfs
Created May 27, 2015 01:50
Show Gist options
  • Save petersonfs/1bab3c8fd90a076ab010 to your computer and use it in GitHub Desktop.
Save petersonfs/1bab3c8fd90a076ab010 to your computer and use it in GitHub Desktop.
Loop table fields
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