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

Hide OptionSet Value of Ribbon Button ( Disqualify Button )

(0) ShareShare
ReportReport
Posted on by 458

Hi there all.
I want to hide some option set value from disqualify button.
I can do this with any field on the form with simple JS.
But in ribbon I do now know how to do this.
I googled, but did not found any similar issue.
issue is this :
I have some option set values in disqualify button of lead(which is in ribbon) that are not necessary any more.
I can not delete them, because my history and report will destroy.
So I need to hide them, But they are in ribbon and I do not know how to access that.
Note that I am aware how to work with ribbon workbench.
thanks

I have the same question (0)
  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    Hi,

    You can do this with Ribbon Workbench by removing the populate query command and adding only your buttons.

    1. Select the Disqualify button (name: Mscrm.Form.lead.DisqualifyLeadAs.UCI)
    2. Right click => Customize Button
    3. Remove the PopulateQueryCommandCore
    4. Drag and drop a Menu section from the Toolbox to the Disqualify button
    5. Drag and drop a Button from the Toolbox to the Menu section
    6. For each Button:
       6.1 In Id, set the status code. Eg: 4 for lost. The associated command uses this id to change the status code.
       6.2 Set the Label, Alt, ...
       6.3 Set the ModernImage to a white space (" ") to have no image displayed.
       6.4 Set CommandCore to Mscrm.Form.lead.DisqualifyAs
    7. Publish

    Example:

    pastedimage1681121857492v1.png

    Result:

    pastedimage1681121880657v2.png

  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    Hi,

    Have you been able to try this solution?

    If my answer helped you, please mark it as answer.

  • Verified answer
    Albert_ Profile Picture
    458 on at

    Thank you for your reply.

    I followd this thread and find a way.

    @Andrew Butenko answer's solves the problem. In his youtube video, he shows how to do this. According to the video, in the first function he writes; he uses xml to populate the flayout. But you can do this via ribbonworkbench visual tools and add your buttons to flayout menu section. there is no need to write the first function. But to do this you must set your command to each button you add.Also your answer is a solution in situation that we do not hidden the disqualify button and works on the main disqualify button. But I actually change my way. I write a WorkFlow that in it's condition I check the satusreason and It's trigger is on statusreason. When the record goes to that special statusreason, I stop the workflow with status of canceled with a message that : This status is not valid anymore.

  • Ben  Walker Profile Picture
    22 on at
    The ribbon workbench solution given in this thread works beautifully if you are only customising the form.

    However, if you need to customise the form and the grid, I can't get it to work, because if you have to use the button ID to hold the option set value, it won't let you save/publish your changes, because the ID of buttons need to be unique and the solution would require you to create multiple buttons with the same ID.
     
    Any ideas how we could get round this, or is there a different way to customise the flyout?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 74 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 31 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans