Search This Blog

Wednesday 9 July 2014

X++ code to Count Records in Query


Hi Guys,

The below code is used to count records in query.


static void Query_cntRecords(Args _args)
{
    Query                query = new Query();
    QueryRun             queryRun;
    QueryBuildDataSource qbd;
   
    
    qbd = query.addDataSource(tablenum(CustTable));
    queryRun = new QueryRun(query);
   
    info(strfmt("Total Records in Query %1",SysQuery::countTotal(queryRun)));
   
}

Happy Daxing......

No comments:

Post a Comment