Friday 16 January 2015

How to get the count of specific records in x++

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.
}

No comments:

Post a Comment