Code to Post Sales Order in MSDAX

If you are trying to post Sales order in Microsoft Dynamics axapta by code then you can use this code in job.

 SalesFormLetter SalesformLetterObject;  
 SalesformLetterObject = SalesFormLetter::construct(DocumentStatus::Invoice);  

Here SalesformLetterObject is object of SalesFormLetter class and its initialized by using construct method and Document status as Invoice passed. Same way you can use for packing slip and picking of Sales order.

After post you need to call update  to post Sales order transaction.