Skip to main content

Notifications

Announcements

No record found.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans