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 452

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

  • Ben  Walker Profile Picture
    13 on at
    Hide OptionSet Value of Ribbon Button ( Disqualify Button )
    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?
  • Verified answer
    Albert_ Profile Picture
    452 on at
    RE: Hide OptionSet Value of Ribbon Button ( Disqualify Button )

    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.

  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at
    RE: Hide OptionSet Value of Ribbon Button ( Disqualify Button )

    Hi,

    Have you been able to try this solution?

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

  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at
    RE: Hide OptionSet Value of Ribbon Button ( Disqualify Button )

    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

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... 293,207 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans