To Count total number of records through query in axapta you can try following code in Ax job. Query query = new Query(); QueryRun queryRun; QueryBuildDataSource qbds; ; qbds = query.addDataSource(tablenum(SalesTable)); queryRun = new QueryRun(query); info(strfmt("Total Records in Salestable is %1",SysQuery::countTotal(queryRun))); you can get same thing by using select query also. select count(recid) from salestable.
Technical Tutorials x++,tips on issues or troubleshooting On Ax ERP ,Microsoft Dynamics 365,Ax 2012,Microsoft , U.S.,Business Software solution.