Adding a button to Document Locations Tab in CRM 2011

After we have configured SharePoint List Component for CRM 2011, and enabled it for the entities, we will have a “documents” link on the left navigation pane of the record. The ribbon will have two buttons Add Location and Edit Location over there.

If we need to add our own button over there, we need to make changes to the “Application Ribbons” in our solution file.

The final output

And the RibbonDiffXML for that

<RibbonDiffXml>
<CustomActions>
<CustomAction Id="AMS_DocumentButton" Location="Mscrm.DocumentsTab.Locations.Controls._children" Sequence="30">
<CommandUIDefinition>
<Button
Id="B_MyFirstButton"
Command="Cmd_JavaScript"
LabelText="My First Button"
ToolTipTitle="My First Button Tool Tip Title"
ToolTipDescription="My First Button Tool Tip Description"
TemplateAlias="o1"
Image16by16="/_imgs/ribbon/saveandclose16.png"
Image32by32="/_imgs/ribbon/saveandclose32.png"/>
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Cmd_JavaScript">
<EnableRules/>
<DisplayRules/>
<Actions>
<JavaScriptFunction
Library="$webresource:new_test"
FunctionName="testDoc">
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>

Hope it helps.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s