AX 2012: Loop through all the fields of a table in X++

This is how we can loop through all the fields of a table in X++: static void Job1(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 … Continue reading AX 2012: Loop through all the fields of a table in X++