Validate Table from X++

Dynamics Ax forms calls the validateField whenever the field value changes. However, this is only called from the Forms. To validate a table for its values from X++, the following code does it

static server boolean validateTable(common _common)
boolean ret = true;
SysDictTable    dictTable;
int fldCnt, i;
fieldId fid;

dictTable = new SysDictTable(_common.TableId);
fldcnt = dictTable.fieldCnt();
for(i = 1; i <= fldcnt; i++)
fid = dictTable.fieldCnt2Id(i);
ret = ret & _common.validateField(fid);

return ret;

3 thoughts on “Validate Table from X++

Leave a Reply / Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s