Menu Close

Using AOT Query object from X++

1) Create a AOT Query Object as your requirement.
2) Create a Job and paste the below code to check the Query Object.
 static void ExecuteAOTQuery(Args _args)  
{
QueryRun queryRun;
Counter totalRecords;
;
queryRun = new QueryRun(queryStr(CreatedAOTQueryName));
if (queryRun.prompt())
{
while (queryRun.next())
{
totalRecords++;
}
}
info(strFmt(“Total Records : %1”, totalRecords));
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.