Reputation: 1029
I successfully followed the following answer to Add Dropdown Menu to CRM 2011 ribbon and implemented three dynamically loaded FlyoutAnchor buttons with sub menu buttons etc.
Yesterday the sub menu buttons were working fine (click event was fired etc), but after a re-import of the solution with the Ribbon XML etc the sub menu buttons were telling me (in the tooltip) that they are disabled. The exact message is "This button is currently disabled. You may not have selected the item that works with this feature. If you don't have permissions to use this feature, contact your system administrator".
So I reverted back to the previous Ribbon XML, but the sub menu buttons remain disabled. It looks like I hit the same issue as described in the following thread: CRM 2011 Dynamic Ribbon disabled HELP!!. But I already have Rollup 6 installed on my server, so this shouldn't occur.
I already tried resetting IIS and re-importing the solution (multiple times). I also checked/added the <EnableRule Id="Mscrm.Enabled" /> rules etc.
I can't get the sub menu buttons enabled again. What am I doing wrong? Please help me.
Upvotes: 2
Views: 2340
Reputation: 1029
I finally got my sub menu buttons enabled again. It's hard to tell the exact combination of actions that got it to work again, but I will try to document it here as a reference. The proposed solution is to force CRM to update the Ribbon entirely. This can be done by executing the following steps:
Replace your <RibbonDiffXml> ...</RibbonDiffXml> with the empty ribbon diff xml, i.e. :
<RibbonDiffXml>
<CustomActions />
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions />
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
Save your change(s).
Another approach that could be taken, is to use the Ribbon Workbench for Dynamics CRM 2011 (Beta). But be carefull and always make a solution backup because I find the tool still pretty buggy (or maybe my solution was too large). Use the tool to make some ribbon changes (for example: add a new button to your 'problem' entity), re-publish and test. If your sub menu buttons are enabled again, re-import and publish your original backup. The sub menu buttons will probably stay enabled.
So something gets screwed up in CRM internally, and by forcing a re-build of the faulty Ribbon, CRM recovers itself or something...I can't really put my finger on it.
Upvotes: 2
Reputation: 1482
I had a similar issue recently. Are your running javascript from the ribbon? If so the ribbon may be disabling your button because it cannot find the javascript function you are calling (I cant find documention to support this belief, the define actions and define javascript pages make no mention of it, it could have just been coincidence in my case). Did you recently update the js file you associate with the ribbon?
Upvotes: 1