MS CRM 2013 Adding Custom RIbbon button in dashboard
In my current project our client asked to add all Essential functionality within the dashboard. In order achive this created web resource with links to all essential functionality like running common Dialogues, Ruining common reports and more. When i showed this to our client they were not happy with the links with in the dashboard. They want all of them opened from the Ribbon button rather as a links within the webresource. I know how to add custom button at entity,subgrid and home page but never tried to add Custom button within the dashboard Page.
After spending sometime with the Application Ribbons xml , i was able to add custom button on the Dashboard. Adding custom button on the dashboard is very similar to adding buttons on the entity form. Only difference is you need to know location group id of the dashboard.
To add custom button on the Dashboard
1. Create new Solution and add Application ribbon as component.
Click on Client Extensions -> Add Existing >> Application Ribbons
2.Export the solution and copy the Customization.xml file to add custom button.
3. Open the customization file and find the <RibbonDiffXml> and add the customactions as below
<RibbonDiffXml>
<CustomActions>
<CustomAction Id=”Mscrm.DashboardTab.Actions.CustomAction” Location=”Mscrm.DashboardTab.Actions.Controls._children”>
<CommandUIDefinition>
<Button Id=”Mscrm.DashboardTab.Actions.CreateInvoice.Button”
Command=”omb.omb_invoice.CreateInvoice.Command”
Sequence=”45″
LabelText=”Create Invoice”
ToolTipTitle=”Create Invoice”
ToolTipDescription=”Create Invoice”
TemplateAlias=”o2″
Image16by16=”/_imgs/ribbon/New_16.png”/>
</CommandUIDefinition>
</CustomAction>
</CustomActions>
Add Command definition as you do in entity custom button.
<CommandDefinitions>
<CommandDefinition Id=”omb.omb_invoice.CreateInvoice.Command”>
<EnableRules />
<DisplayRules/>
<Actions>
<JavaScriptFunction FunctionName=”Develop1_RibbonCommands_runDialogGrid” Library=”$webresource:omb_rundialog”>
<StringParameter Value=”3BC99E21-EECB-E311-9517-6C3BE5A80184″ />
<StringParameter Value=”systemuser” />
<StringParameter Value=”FA2AB070-0FA3-4BD7-A8C2-22ECD9BC404C” />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
4.Save the customization and place saved customization file back to Solution Zip file
5. Import the solution and publish it .
Reload your dashboard to see the new button
This was originally posted here.

Like
Report
*This post is locked for comments