
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:
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:
Given that this is built-in Dynamics functionality, I expected this to work just fine. However, after...
...the following error appears:
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:
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:
Thank you very much,
-Dakota
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