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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Revising Opportunities and Quotes that have already been Closed

(0) ShareShare
ReportReport
Posted on by 25
As a system admin, I'm trying to figure out the best way to do this.  Currently, the only way I have figured how to do this is to reopen the opportunity, delete the products under the quote, then delete the quote and generate a new quote, activate it and win it.  However, this also changes the quote number which is what I want to avoid.  I've tried using Online Excel and the Level Up extension, but both just produced other issues that I couldn't fix.
 
1. Is it possible to do this with out changing the current quote #?
2. If not, is there at least an easier way to change the $ amounts?
I have the same question (0)
  • Verified answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Revising Opportunities and Quotes that have already been Closed
    Hi,
     
    You can add a custom button on the quote form to switch from the closed state to the draft state, and this button is only visible in the closed state.
     
    The JavaScript executed by clicking the button is as follows.
    function SwitchToDraft(primaryControl) {
            var formContext = primaryControl;
     
            //Gets the GUID of the current record.
            var currentRecordId = formContext.data.entity.getId().slice(1,-1);
     
            //Updates the current record to draft status.
            window.top.Xrm.WebApi.updateRecord("quote", currentRecordId, {"statecode":0}).then(
            function success(result) {
                console.log("Current quote switched to draft status");
               
                //Refresh after successful update.
                formContext.data.refresh(true);
            },
            function (error) {
                console.log(error.message);
            }
        );
       
    }
     
    The code to set the button visibility is as follows.
    function SwitchVisibility(primaryControl){
        var formContext = primaryControl;
        // Gets the status field value
        var status = formContext.getAttribute("statecode").getValue();
       
        // If the value of the Status field is not 3, then it is not closed status and the button is hidden.
        if(status !==3){
            return false;
        }else{
            return true;
        }
    }
     
    Add this button to Ribbon Workbench.
     
    The final result is shown below.
     
    Best Regards,
    Dengliang Li
     
  • DonaW Profile Picture
    25 on at
    Revising Opportunities and Quotes that have already been Closed
    This is awesome, thank you.  It worked great.  I know I'm asking a lot and this is probably not doable, but is there a way to do this without having to open the flow and copy the URL each time?
  • Verified answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Revising Opportunities and Quotes that have already been Closed
    Hi,
     
    You can update closed quotes to draft status in Power Automate Flow.
    In my test, I selected a closed quote record.
     
    The flow is shown below.
     
    In the test result the quote went back to draft status and the ID did not change.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 174

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 121 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans