web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to get all Columns of Table in ax 2012 by job x++ code

SANTOSH KUMAR SINGH Profile Picture SANTOSH KUMAR SINGH 1,224
To get all Columns of Table in ax 2012 by job x++ code you can try below code . If you table have large number of columns and do not have much time then you can use this job to get all columns to use in your code.

This job can be very useful for your development.

  DictTable  dictTable = new sysDictTable(tableNum(testTable));  
fieldId fieldId=dictTable.fieldNext(0);
dictField dictField;
while(fieldId)
{
dictField=dictTable.fieldObject(fieldId);
info(strFmt('testTable.%1 = %2;',
dictField.name(),
any2str("")));
fieldId= dictTable.fieldNext(fieldId);
}


This was originally posted here.

Comments

*This post is locked for comments