Tuesday, December 3, 2013

How to access Query data of AOT in Ax 2012 by code

To access Query data of AOT in Ax 2012 by code you can check code below.

TestTable TestTable;
Query q=new Query(queryStr(TestQuery));
QueryRun qr=new QueryRun(q);
while(qr.next())
{
TestTable=qr.get(tableNum( TestTable));
TestTable=qr.get(tableNum(TestTable));
info(strfmt("%1,%2", TestTable.Description, TestTable.TestId));
}