Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

(0) ShareShare
ReportReport
Posted on by 340

Hi,

I need to restore the deleted buttons "Close as WON" and "Close as Lost" on Opportunity Form . 

I am also using ribbon workbench managed solution.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Thank you for the definition.  I needed the command which I lost.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Hi Amiy

    Add only opportunity entity from any of your other Instances in your solution without adding Assets and Components/Sub Components where those buttons already exists and then export solution as Unmanaged and again Import that into Troubleshooter Instance and Publish All Customizations will solve your problem that you are facing.

    Hope this helps !

    Poojan Bhayani

  • Karsten Wirl Profile Picture
    Karsten Wirl 4,477 on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    I agree with the others. Try to get the buttons from a different instance.

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Either you create custom buttons for delete or import from a trial Instance for the opportunity alone(you will loose your custom buttons created) then you need to recreate all your custom buttons.

    Hope this helps

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    The easiest way to fix this is spin up a trial or get access to another environment that has the buttons.  Just copy everything exactly using the ribbon workbench and the buttons will work as if they had never been removed.

    Here is the xml if you want to take that approach

       <CustomAction Id="new.Mscrm.Form.opportunity.MarkAsWon.CustomAction" Location="Mscrm.Form.opportunity.MainTab.Actions.Controls._children" Sequence="3">

         <CommandUIDefinition>

           <Button Alt="$Resources:Ribbon.Form.opportunity.MainTab.Actions.MarkAsWon" Command="Mscrm.Form.opportunity.MarkAsWon" Id="Mscrm.Form.opportunity.MarkAsWon" Image32by32="/_imgs/SFA/MarkAsWon_32.png" Image16by16="/_imgs/SFA/MarkAsWon_16.png" LabelText="$Resources:Ribbon.Form.opportunity.MainTab.Actions.MarkAsWon" Sequence="3" TemplateAlias="o1" ToolTipTitle="$Resources:Mscrm_Form_opportunity_MainTab_Actions_MarkAsWon_ToolTipTitle" ToolTipDescription="$Resources:Mscrm_Form_opportunity_MainTab_Actions_MarkAsWon_ToolTipDescription" ModernImage="MarkAsWon" />

         </CommandUIDefinition>

       </CustomAction>

       <CustomAction Id="new.Mscrm.Form.opportunity.MarkAsLost.CustomAction" Location="Mscrm.Form.opportunity.MainTab.Actions.Controls._children" Sequence="4">

         <CommandUIDefinition>

           <Button Alt="$Resources:Ribbon.Form.opportunity.MainTab.Actions.MarkAsLost" Command="Mscrm.Form.opportunity.MarkAsLost" Id="Mscrm.Form.opportunity.MarkAsLost" Image32by32="/_imgs/SFA/MarkAsLost_32.png" Image16by16="/_imgs/SFA/MarkAsLost_16.png" LabelText="$Resources:Ribbon.Form.opportunity.MainTab.Actions.MarkAsLost" Sequence="4" TemplateAlias="o1" ToolTipTitle="$Resources:Mscrm_Form_opportunity_MainTab_Actions_MarkAsLost_ToolTipTitle" ToolTipDescription="$Resources:Mscrm_Form_opportunity_MainTab_Actions_MarkAsLost_ToolTipDescription" ModernImage="MarkAsLost" />

         </CommandUIDefinition>

       </CustomAction>

       </CommandDefinition>

       <CommandDefinition Id="Mscrm.Form.opportunity.MarkAsWon">

         <EnableRules>

           <EnableRule Id="Mscrm.CanWritePrimary" />

           <EnableRule Id="Mscrm.OpportunityIsOpen" />

           <EnableRule Id="Mscrm.IsAvailableInMocaOffline" />

         </EnableRules>

         <DisplayRules>

           <DisplayRule Id="Mscrm.CanWriteOpportunity" />

         </DisplayRules>

         <Actions>

           <JavaScriptFunction FunctionName="Mscrm.OpportunityCommandActions.opportunityClose" Library="$webresource:Opportunity_main_system_library.js">

             <BoolParameter Value="true" />

           </JavaScriptFunction>

         </Actions>

       </CommandDefinition>

       <CommandDefinition Id="Mscrm.Form.opportunity.MarkAsLost">

         <EnableRules>

           <EnableRule Id="Mscrm.CanWritePrimary" />

           <EnableRule Id="Mscrm.OpportunityIsOpen" />

           <EnableRule Id="Mscrm.IsAvailableInMocaOffline" />

         </EnableRules>

         <DisplayRules>

           <DisplayRule Id="Mscrm.CanWriteOpportunity" />

         </DisplayRules>

         <Actions>

           <JavaScriptFunction FunctionName="Mscrm.OpportunityCommandActions.opportunityClose" Library="$webresource:Opportunity_main_system_library.js">

             <BoolParameter Value="false" />

           </JavaScriptFunction>

         </Actions>

       </CommandDefinition>

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Yes, I saw that after my reply. Starting replying and got called in for something else.

    I think the link the Guillaume posted might help you out.

    You should get the button information from a different uncustomized instance and recreate it.

    If this is an unmanaged solution, you might try export it from a different instance and import to your current instance, or just recreate the buttons using the same buttons, properties, commands, display rules and enable rules as the one in the original instance.

    Hope this helps. Good luck.

  • Amiy  Profile Picture
    Amiy 340 on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Hi Aric,

    There are no commands under Hide Actions , I already checked this .

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Did you just hide the buttons, or did you actually customize the command of the button?

    If you open ribbon workbench for the Opportunity entity, and expand the "Hide Actions" (central pane under the command bars), you should see any commands that were hidden.

    You should see the MarkAsWon and MarkAsLost command there.

    Right click on them, and select Un-Hide.

    Publish your solution after that.

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Hi,

    Hmm if it was deleted it seems that Scott Durow (the creator of the Ribbon workbench) states that it is gone for ever: community.dynamics.com/.../216313

    I think the only possiblity for you would be to open a trial instance in the correct version (the one that you have) and export from there the ribbon of opportunity. Of course it will be the OOTB ribbon thus you will loose your other customizations

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to restore the deleted button "Close as WON" and "Close as Lost" on Opportunity Form

    Hi,

    did you took a look at this solution. ribbonworkbench.uservoice.com/.../235292-restore-a-button-that-has-been-removed-from-the-cr ?

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans