Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Revising Opportunities and Quotes that have already been Closed

Posted on by 23
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?
  • Verified answer
    Dengliang Li Profile Picture
    Dengliang Li 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
    DonaW 23 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
    Dengliang Li 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans