To get the count of records in x++, see the example given below. Here, in an AX job, we are getting count of all the sales orders that belong to a specific customer account.
static void JobCount(Args _args)
{
SalesTable salesTable;
select count(RecId) from salesTable
where salesTable.CustAccount == '1101';
info(strFmt('%1',salesTable.RecId)); // Display the count value.
}
static void JobCount(Args _args)
{
SalesTable salesTable;
select count(RecId) from salesTable
where salesTable.CustAccount == '1101';
info(strFmt('%1',salesTable.RecId)); // Display the count value.
}