Quantcast
Channel: Dynamics Ax – Shashi's Ax.Net Space
Viewing all articles
Browse latest Browse all 57

Validate Table from X++

$
0
0

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

Viewing all articles
Browse latest Browse all 57

Trending Articles