Po Submit and approve workflow through code

 After the request change on Po confirm button is grey out and its not allow to confirm below job helps to complete this

  1. VersioningPurchaseOrder versioningPurchaseOrder;
  2.  
  3. versioningPurchaseOrder = VersioningPurchaseOrder::newPurchaseOrder(purchTable, true);
Change the status in draft
  1. versioningPurchaseOrder.createChangeRequest();
  2. ..
  3. purchtable.update();
  4. ..
  5. purchLine.update();
  6. .. this is used to submit and approved it
  7. versioningPurchaseOrder.submitChangeRequest();
  8. versioningPurchaseOrder.approveChangeRequest();

Comments

Popular posts from this blog

Customization on Sales invoice Report in D365 F&O

75) COC - Create a coc of the table modified method

46) D365 FO: SHAREPOINT FILE UPLOAD USING X++