Showing posts with label Calculate Amount Credit using index hint in Ax 2012. Show all posts
Showing posts with label Calculate Amount Credit using index hint in Ax 2012. Show all posts

Monday, 4 June 2018

Calculate Amount Credit using index hint in Ax 2012

static void CalculateAmountCredit(Args _args)
{
    CustTable   custTable;
    CustTrans   custTrans;

    while select sum(AmountCur),AccountNum from custTrans
        index hint voucherdateIdx
        //group by AccountNum
        join custTable where CustTable.AccountNum == CustTrans.AccountNum
    {
        info(strFmt("%1,",custTrans.AmountCur));
    }
}