01 February 2014

Queries query classes example in AX 2012

static void Query_cntRecords(Args _args)
{
Query query = new Query();
QueryRun queryRun;
QueryBuildDataSource qbd;
int64 iCountRecords;
;

qbd = query.addDataSource(tablenum(CustTable));
queryRun = new QueryRun(query);
iCountRecords = SysQuery::countTotal(queryRun);

info(strfmt("Total Records in Query %1", SysQuery::countTotal(queryRun)));

}

No comments:

Post a Comment

Give me the commetns and solutions

AXmodel file import in D365 F&O

 ModelUtil.exe -import -metadatastorepath=k:\aosservice\packageslocaldirectory -file=C:\Temp\DEST.axmodel