Auto confirm purchase order confirmation through X++ code in D365 F&O
Views (245)
//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);
This was originally posted here.
*This post is locked for comments