web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Error - Changes to the document are only allowed in state Draft, because change management is activated during auto submit workflow on PO

(0) ShareShare
ReportReport
Posted on by 30

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 ---

Changes to the document are only allowed in state Draft, because change management is activated.

@@ When I disabled the change management then successfully auto submit the workflow without 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!

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,119 Super User 2025 Season 2 on at

    Hi @rp@n,

    Change management is used to track changes done on purchase orders after sending confirmations to the vendor. You can find the documentation here: docs.microsoft.com/.../key-tasks-change-management-for-purchase-orders

    Yes, change management is related to workflow. If change management is disabled, the workflow bar to submit purchase orders for approval is also not active. As you mentioned you have an issue, so I think there might be a difference between your auto submit and the manual submit. I don't know what you have done exactly. I also don't know why you shared a job to disable change management on a specific purchase order.

  • @rp@n Profile Picture
    30 on at

    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??

  • @rp@n Profile Picture
    30 on at

    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 

  • André Arnaud de Calavon Profile Picture
    301,119 Super User 2025 Season 2 on at

    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.

  • @rp@n Profile Picture
    30 on at

    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 

  • Suggested answer
    Rachit Profile Picture
    4,015 User Group Leader on at

    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.

  • @rp@n Profile Picture
    30 on at

    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 

  • André Arnaud de Calavon Profile Picture
    301,119 Super User 2025 Season 2 on at

    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.

  • @rp@n Profile Picture
    30 on at

    Andre, my issue is I am getting an error when submitting the workflow in PO

    Changes to the document are only allowed in state Draft, because change management is activated. " while submitting the workflow.

    *** 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. 

  • @rp@n Profile Picture
    30 on at

    Andre, Rachit, please reply me on this.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans