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

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.