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,...
Answered

Revising Opportunities and Quotes that have already been Closed

(1) ShareShare
ReportReport
Posted on by 21
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
    21 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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Mohit Sharma Profile Picture

Mohit Sharma 24 Community Manager

#2
Jahanvi Profile Picture

Jahanvi 21

#3
Jatin kumar "Mandlay" Profile Picture

Jatin kumar "Mandlay" 14

Featured topics

Product updates

Dynamics 365 release plans