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 :
Microsoft Dynamics CRM (Archived)

Ribbon Workbench - How to get a button to display

(0) ShareShare
ReportReport
Posted on by 329

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

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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?

  • LCRMAdminG Profile Picture
    329 on at

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

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

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Yes. That is correct?

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

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans