How to confirm the purchase order?

Hi All,
After confirmed the purchase order, i am changing the batch number of the purch order line items in product receipt form "Packing slip" by using customized button.  So, the purchase order status is changed to approved. So, I have to also change the purchase order to confirm.
Please guide to confirm the purchase order through x++ code.
  • please try following code to confirm the Purchase order
        purchTable = PurchTable::find(PurchId)
       purchFormLetter = PurchFormLetter::construct(DocumentStatus::PurchaseOrder);
       purchFormLetter.update(purchTable, strFmt("Inv_%1", purchTable.PurchId));

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.