calculate time for running process in Ax 2012


Description:-

In this article we will see about how to calculate time for running process in dynamics ax. Here I have created simple Job to get running time for getting data in dynamics ax.
Code:-
static void CalculateTime(Args _args)
{
    int startTime = timeNow();
    int endTime;
    SalesTable SalesTable;
    int countrecords=0;
    while select SalesTable
    {
        countrecords++;
    }
    endTime = timeNow();
    
    info(strFmt("Process took %1", timeConsumed(startTime, endTime
    info(strFmt("Tome : %1  to %2",time2str(startTime,1,1),time2str(endTime,1,1)));
    info(strFmt("Count records - %1",countrecords));    
}

Output:-

Related Posts

Previous
Next Post »

Thanks for comments.....