Thursday, May 24, 2012

X++ code 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)));
    
}

No comments:

How to identify the user that was used to change an object from AOT in AX2012

Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...