Thursday, February 15, 2024

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);

No comments:

Post a Comment