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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Setting a Quote back to "Draft" state, getting error "Active stage is not on '{0}' entity."

(0) ShareShare
ReportReport
Posted on by 15

Hello, I am having issues in attempting to set a Quote from 'Won" back to "Draft".

Firstly, I have been successfully doing this for some time with the following code snippet:

pastedimage1624554754100v1.png

After which, the Quote is returned to Draft, can be edited, Activated and then I can successfully create an Order from it. There are no issues here, only that I have to run this code manually from a console app.

My issues arose when I tried to automate this process with a custom button in the ribbon, added using Ribbon Workbench.

First I made a process to set the Quote to Draft state, which was called by the ribbon button:

pastedimage1624555128249v2.png

Given that this is built-in Dynamics functionality, I expected this to work just fine. However, after...

  • Executing this Process (setting the Quote back to Draft state)
  • Activating the Quote 

pastedimage1624555872678v5.png

  • Then attempting to Create Order from the Quote

pastedimage1624555951573v6.png

...the following error appears:

pastedimage1624555210845v3.png

It seems even though I Activated the Quote with the built in "Activate Quote" button in the UI, there was an error along the way in the background setting the Quote to Active state. However when analyzing the Quote in code, we can see that the Quote is clearly in Active state: 

pastedimage1624555366711v4.png

After searching the web about this error and coming up empty handed, I then decided to abandon the built in changing of record status and created a Web Service for my process to call that runs the same code snippet from the very beginning that I usually have to run manually. The code executes and the Quote is successfully put into Draft state. However, upon Activating and creating an Order, the same error persists.

The only difference I can see with the two methods that result in the error message, and the method I have that doesn't result in error is the fact that the two methods that error are ran from a Process, specifically an "Action".

I am at a loss here in attempting to automate reopening a Quote from a ribbon button and associated Process. Can anyone please shed some light on this error? Is there something I am missing here? 

Here is an expanded version of the error message, pulled from the Developer Console:

pastedimage1624556273850v7.png

Thank you very much,

-Dakota

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi Dakota,

    The error message should have nothing to do with the ribbon button. It’s mostly like related to the BPF, which processes the Quote.

    Here is a similar issue about the BPF "Lead to Opportunity Sales Process", which you can refer to:

    (+) Active stage is not on 'Lead' entity. - Microsoft Dynamics CRM Forum Community Forum

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans