Hi all,
I’m working with D365 Finance & Operations 10.0.41 (on-prem) and have a requirement around POs that are created by firming planned purchase orders.
Business requirement
When a PO is created by firming a planned order, the business wants the PO to be in Draft status so that users can review it and submit it to workflow manually.
At the same time, we want to keep standard MRP behavior:
PO should still create InventTrans “On order”
Master planning should behave like standard (e.g. if SO = 450 and PO = 440, the next plan should suggest a new planned order for the missing 10).
I’ve read this blog and used it as a starting point:
> Set purchase order workflow status as Draft when it's created from planned orders
https://d365fandotech.blogspot.com/2024/07/set-purchase-order-workflow-status-as.html
The blog uses a CoC on ReqTransPoMarkFirm.shouldSkipWorkflowSubmissionAndApproval() and returns true under certain conditions so that the PO is created as Draft and the workflow is not auto-submitted/approved.
Concern
As Ali Danish and others have mentioned, if firmed POs stay in Draft, MRP might create duplicate planned orders, because there is no “On order” inventTrans yet while the PO is Draft.
Because of that, I’m considering a different pattern:
1. Let standard run first when firming the planned PO
PO is created as Approved
InventTrans “On order” and pegging are created as in standard
2. In a CoC on ReqTransPoMarkFirm.purchTablePostProcessing()
Collect the PurchIds that were just created from firmed planned orders
After the next call, simply set PurchTable.DocumentState from Approved back to Draft (no change to InventTrans, PurchStatus, PurchTableVersion, or ChangeRequestRequired).
So effectively, the PO has already been Approved once (so MRP can see the supply), but the document state is reverted to Draft for workflow/user review.
Questions
1. Is this “approve first, then revert DocumentState to Draft” pattern considered safe / acceptable in your experience?
Any known side effects with change management, history, or future upgrades (Planning Optimization, etc.)?
2. Has anyone implemented the approach from the blog (using shouldSkipWorkflowSubmissionAndApproval() to create Draft POs directly) in production?
How did you deal with the risk of duplicate planned orders when POs stay in Draft?
3. From an MRP and functional point of view, which approach would you recommend?
A) Create the PO as Draft directly (skip workflow submission/approval)
B) Let it be Approved to create InventTrans, then revert DocumentState to Draft (my current idea)
Any insight or experience (especially from projects where this is running in production) would be really appreciated.
Thanks!