Announcements
No record found.
I am looking for a way to automate sales order completion through code. Any help or clue will be appreciated.
I think you have to enable the sales order completion from setup. Also it appears only for the open order which hasn't been confirmed yet.
Following snippet will do the job.
SalesTable salesTable = SalesTable::find(salesOrder.parmSalesId()); MCRSalesOrderTotals mcrSalesOrderTotals = new MCRSalesOrderTotals(salesTable, true); //complete MCREndOrder::endOrder(salesTable.SalesId, true, mcrSalesOrderTotals, false);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.