Validate Table from X++
Views (780)
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;
}
Filed under: Ax 2009, Dynamics Ax
This was originally posted here.

Like
Report
*This post is locked for comments