Cancel Sales order with Code

Hi all,

Please help me to cancel multiple sales orders or single sales order with code.

//Below is a sample code, the code might need extension depending on the multiple/complex scenario’s


while select forupdate salesLine

where salesLine.SalesId == salesTable.SalesId


salesLine.RemainInventPhysical = 0;

salesLine.RemainSalesPhysical = 0;




Hi Kranthi**,**

Thanks for your Quick reply. its working fine.

Can you please explain me , how to implement this from .Net through AIF service.