hi All,
auto submit workflow in purchase order in AX 2012 r3 - Microsoft Dynamics AX Forum Community Forum
Finally I git the solution and able to submit the PO workflow.
I have added below code also
To Disable the change management
PurchTable purchTable; ; select forUpdate purchTable where purchTable.PurchId == "PO-0006371"; if(purchTable) { purchTable.ChangeRequestRequired = NoYes::No; purchTable.update(); }
Kindly let me know , *** before I am getting below error ---
1. What is change management ? And what is does?
2. Now I disabled the change management , Is it do any impact on workflow? I mean my workflow ( auto submit) will work as same like manual submit workflow ?
Please give me more shed on this.
thanks!
Hi @rp@n,
You are getting the error only with your customization or also when you submit manually? If it is with your customization, check if the coding is correct. Not sure if you need to set the workflow status on the purchase order yourself. Maybe, it will already be done by activating the workflow. If this is not the case, then try to first update the workflow status on the order; then activate the workflow.
Andre, Rachit, please reply me on this.
Andre, my issue is I am getting an error when submitting the workflow in PO
*** If I disable the change management by code, as I mentioned in above then no error and workflow submitted successfully.
@@ But as you suggested , the disabiling change management is not good approach. That's why I am asking how I will resolve this issue without disabling the change management?
I hope you understand.
Please give me more shed on this.
Hi @rp@n,
What is your issue? In this thread you only asked about what is change management and what happens if you disable it.
Thanks Rachit and Andre,
I am agreed with your answers. Finally let me know how I will resolve this issue?
Please give me more shed on this
hi @rp@n,
There is no silver bullet answer to your question. It will create inconsistencies in your table records and workflow history tables. Bypassing setups via code will also lead to situations where the system behavior will not be in sync with the setups as you are bypassing the setup rule. I agree with Andre that this is not a best approach.
These things should be controlled by configurations only.
Hope this helps.
Thanks Andre,
Kindly let me know, what kind of side effects can happen if I disabling the change management and perform workflow.
Please give me more shed on this
Hi @rp@n,
If you don't have issues anymore, I think you have a solution. However, it doesn't seem OK to me disabling the change management. It could have another side-effects. But I haven't came across your requirement before.
Andre, I am facing the issue before but after disable the change management , the issue is resolved. And able to auto submit the PO.
If anything else please let me know
Thanks Andre,
I have added the code to disable change management and able to auto submit the workflow now. And also workflow shown in completed atatis.
Is any other things to check??
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156