Notifications
Announcements
No record found.
I have changed management enabled for purchase order workflow approval. I intend to invoke purchase order re-approval policy rule for a custom field that I have added in table extension of PurchTable and PurchLine table. The custom field is a boolean field, I am changing the field through my code by putting it to false (initially it is set to true) so that workflow sees it as a change in field and assign it to respective approver.
I have added my custom field to purchase order re-approval policy rule fields but it is still auto approving it. Can anybody help?
Hi Talbia,
You can navigate to Procurement and sourcing > Setup > Procurement and sourcing workflows.
and make sure the workflow's version is Active.
https://community.dynamics.com/ax/b/galynafedorovaaxblog/posts/msdyn365fo-purchase-order-reapproval-within-change-management-functionality
regards
Have you also made your custom field part of versioning framework as described here?
docs.microsoft.com/.../maps-with-versioning
If you dont make it part of versioning, there wouldnt be possibility of checking the old and current values and trigger reapproval.
Thank you for your reply.
How can I make it part of versioning?
Let me give you a brief overview of my scenario, I firm planned purchase orders which generate purchase orders with status "Approved" (ensures an inventory transaction), my code changes that status to draft sends it to PO workflow for approval. As the PO already attained the status of Approved once when it was generated, workflow approves it right away as nothing has been changed. In order to enforce re-approval, I have created a custom field in PurchTable as well as in PurchLine table and I am trying to change that field through my code. In my re-approval purchasing policy rule, I have also kept this custom field under Purchase order and Purchase order lines but my workflow has condition Purchaseorderslines.requires re-approval=No => Auto approve.
My code works fine when I change field on Purchtable (it is being refelected on PO header level) but I cannot figure out how to do it on line level to invoke re-approval.
Have you gone through the link I shared? That guides you exactly how you can extend the versioning framework.
Yes I have gone through that link. I am looking for a way out to accomplish this task without extending table map extension as shown in the link you shared. Because I have tested some manually created POs and tried changing the same custom field and it works fine which means that my custom field is being considered by purchasing policy and version comparison is also taking place for manually created POs but its not working from automatically generated POs by firming planned purchase orders.
When you are setting your custom field? During Purchase order creation or after the PO is created and approved?
In case you are doing before, you need to do following:
1. Standard will create PO
2. It will then approve the PO if Change management is activated
3. You now need to write logic to bring the PO back to draft state
4. Now update your custom field.
When you do manually as well, you first click on Request change button and then update the field before you submit to workflow.
Hi Sumit,
Yes exactly. When a PO is created it is in Approved state,
then my code changes that Approved state to draft.
Once it is in draft,
I intend to set that custom field and submit it to workflow for approval again, but my code is not setting that custom field at PO line level.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 559 Most Valuable Professional
André Arnaud de Cal... 464 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader