Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Ribbon Workbench - How to get a button to display

(0) ShareShare
ReportReport
Posted on by 321

I have been fighting with security roles in my instances. After discovering an issue where many users had system admin privileges incorrectly, I am working to lock that down, by creating individual security roles for different job roles. One of my job roles needs a button to appear in the command bar on opportunities. Since removing their accidental sysadmin rights, they no longer see that button. 

I went into Ribbon Workbench, and opened the solution where the button is housed. I found the button, and tried editing the Display rules so it would appear again. No luck. So I removed the Display Rule altogether, still no luck. Anyone have an idea how I can get this working again? It was based on a privilege I have checked, and the role does have it (Global Write on the Entity in question) but it still won't show up. Below are some screenshots. Any help would be appreciated. I also would be satisfied if ALL users saw it, as only one role has the rights to actually use it.

2017_2D00_11_2D00_22_5F00_12_2D00_06_2D00_43.jpg

Also, here is my XML

<?xml version="1.0" encoding="utf-16"?>
<RibbonDiffXml xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">
<CustomActions>
<CustomAction Id="cd.new.opportunity.Button1.Button.CustomAction" Location="Mscrm.HomepageGrid.opportunity.MainTab.ExportData.Controls._children" Sequence="40">
<CommandUIDefinition>
<Button Alt="$Resources:Ribbon.HomepageGrid.MainTab.Find.AdvancedFind" Command="Mscrm.OpenGridAdvancedFind" Id="new.opportunity.Button1.Button" Image32by32="/_imgs/ribbon/advancedfind32.png" Image16by16="/_imgs/ribbon/AdvancedFind_16.png" LabelText="$Resources:Ribbon.HomepageGrid.MainTab.Find.AdvancedFind" Sequence="40" TemplateAlias="o1" ToolTipTitle="$Resources:Ribbon.HomepageGrid.MainTab.Find.AdvancedFind" ToolTipDescription="$Resources:Ribbon.HomepageGrid.AdvancedFind.TooltipDescription" />
</CommandUIDefinition>
</CustomAction>
<CustomAction Id="cd.opportunity.NumberAsssignment.Button.CustomAction" Location="Mscrm.Form.opportunity.MainTab.Actions.Controls._children" Sequence="4">
<CommandUIDefinition>
<Button Alt="$LocLabels:cd.opportunity.NumberAsssignment.Button.Alt" Command="cd.opportunity.AssignNumber.Command" Description="Assign the next number to this Opportunity" Id="cd.opportunity.NumberAsssignment.Button" Image32by32="$webresource:cd_Image_NextNumber_32" Image16by16="$webresource:cd_Image_NextNumber_16" LabelText="$LocLabels:cd.opportunity.NumberAsssignment.Button.LabelText" Sequence="4" TemplateAlias="o1" ToolTipTitle="$LocLabels:cd.opportunity.NumberAsssignment.Button.ToolTipTitle" ToolTipDescription="$LocLabels:cd.opportunity.NumberAsssignment.Button.ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
<HideCustomAction HideActionId="new.Mscrm.Form.opportunity.Recalculate.Hide" Location="Mscrm.Form.opportunity.Recalculate" />
<HideCustomAction HideActionId="new.Mscrm.HomepageGrid.opportunity.AdvancedFind.Hide" Location="Mscrm.HomepageGrid.opportunity.AdvancedFind" />
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates" />
</Templates>
<CommandDefinitions>
<CommandDefinition Id="cd.opportunity.AssignNumber.Command">
<EnableRules>
<EnableRule Id="cd.opportunity.AssignNumber.EnableRule" />
</EnableRules>
<DisplayRules />
<Actions>
<JavaScriptFunction FunctionName="SetOpportunityNumber" Library="$webresource:cd_ClientSideEvents_Opportunity" />
</Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.OpenGridAdvancedFind">
<EnableRules />
<DisplayRules>
<DisplayRule Id="Mscrm.HideOnModern" />
<DisplayRule Id="Mscrm.HideForTabletExperience" />
<DisplayRule Id="Mscrm.OutlookClient" />
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="Mscrm.RibbonActions.openAdvancedFind" Library="/_static/_common/scripts/RibbonActions.js">
<CrmParameter Value="SelectedControl" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Mscrm.HideForTabletExperience">
<HideForTabletExperienceRule />
</DisplayRule>
<DisplayRule Id="Mscrm.HideOnModern">
<CommandClientTypeRule Type="Modern" InvertResult="true" />
</DisplayRule>
<DisplayRule Id="Mscrm.OutlookClient">
<CrmClientTypeRule Type="Outlook" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="cd.opportunity.AssignNumber.EnableRule">
<CustomRule FunctionName="EnableNumberIcon" Library="$webresource:cd_ClientSideEvents_Opportunity" Default="false" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels>
<LocLabel Id="cd.opportunity.NumberAsssignment.Button.LabelText">
<Titles>
<Title description="Next Number" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cd.opportunity.NumberAsssignment.Button.ToolTipTitle">
<Titles>
<Title description="Assign Next Number" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cd.opportunity.NumberAsssignment.Button.ToolTipDescription">
<Titles>
<Title description="Assign the next number to this Opportunity" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cd.opportunity.NumberAsssignment.Button.Alt">
<Titles>
<Title description="Assign Next Number" languagecode="1033" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>

*This post is locked for comments

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Ribbon Workbench - How to get a button to display

    Yes. That is correct?

    The function should return a value of true for the button to be displayed.

  • ToniG Profile Picture
    ToniG 321 on at
    RE: Ribbon Workbench - How to get a button to display

    You're looking for what this line refers to, correct?

    <CustomRule FunctionName="EnableNumberIcon" Library="$webresource:cd_ClientSideEvents_Opportunity" Default="false" />

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Ribbon Workbench - How to get a button to display

    Can you please post the code that you have in the EnableNumberIcon function on your JavaScript cd_ClientSideEvents_Opportunity?

    Although sometimes it's hard to pinpoint, but the Xml seems correct. The main thing is, is your EnableNumberIcon function returning a true value to display the button?

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,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans