Skip to main content

Auto confirm purchase order confirmation through X++ code in D365 F&O

                     //Auto confirm the purchase order.

                        PurchFormLetter purchFormLetter;


                        purchFormLetter = PurchFormLetter::construct(DocumentStatus::PurchaseOrder);

                        PurchaseOrderId purchOrderDocNum = strFmt('%1-%2', purchTable.PurchId, VendPurchOrderJour::numberOfPurchaseOrderVersions(purchTable)+1);

                        purchFormLetter.update(purchTable, purchOrderDocNum);

Comments

*This post is locked for comments