Search This Blog

Tuesday, October 15, 2013

How to Cancel a Sales Order in AX using X++

Hi All,

To cancel a sales order using X++ I tried the below code, I hope it will be helpful for you.

ttsBegin;
    while select forupdate salesLine
        where salesLine.SalesId == salesTable.SalesId
    {
        salesLine.RemainInventPhysical = 0;
        salesLine.RemainSalesPhysical  = 0;
        salesLine.update();
    }
ttscommit;

Happy Daxing,
AX Dude

1 comment: