Step By Step Extending MS CRM 2011 Ribbon Part-2

In this post I am going to show how to add new group in existing tab. You can check my previous post to add button on exiting group. We need to follow the same steps from 1-5  and then follow below steps.

6. Add a Group node to create a new group.

<Group Id =”MyTest.Account.Form.CustomAction.CustomWeb” Sequence=”60″ Title=”CustomWeb” Template=”Mscrm.Templates.Flexible2″>

<Controls Id =”MyTest.Account.Form.CustomAction.CustomWeb.Controls”>

</Controls>

</Group>

7. Add a CustomAction node for scaling like below
<CustomAction Id=”MyTest.Account.Form.CustomAction.Scaling” Location=”Mscrm.Form.account.MainTab.Scaling._children” Sequence=”1000″>

<CommandUIDefinition>

<MaxSize Id=”MyTest.Account.Form.CustomAction.MaxSize” GroupId=”MyTest.Account.Form.CustomAction.CustomWeb” Sequence=”51″ Size=”LargeLarge” />

</CommandUIDefinition>
</CustomAction>

 

Now your final ribbon definition should look like below

<RibbonDiffXml>
<CustomActions>
<CustomAction Id=”MyTest.Account.Form.CustomAction” Location=”Mscrm.Form.account.MainTab.Groups._children”>

<CommandUIDefinition>

<Group Id =”MyTest.Account.Form.CustomAction.CustomWeb” Sequence=”60″ Title=”CustomWeb” Template=”Mscrm.Templates.Flexible2″>

<Controls Id =”MyTest.Account.Form.CustomAction.CustomWeb.Controls”>

<Button Id=”MyTest.Account.Form.MyCustomButton” ToolTipTitle=”This is Test” ToolTipDescription=”This is test”

Command=”MyTest.Account.Form.CommandDefinition”

Sequence=”10″ LabelText=”Web Testing” Alt=”Test” Image16by16=”/_imgs/ribbon/WebPage_16.png” Image32by32=”/_imgs/ribbon/WebPage_32.png” TemplateAlias=”o1″ />

</Controls>

</Group>

</CommandUIDefinition>
</CustomAction>
<CustomAction Id=”MyTest.Account.Form.CustomAction.Scaling” Location=”Mscrm.Form.account.MainTab.Scaling._children” Sequence=”1000″>

<CommandUIDefinition>

<MaxSize Id=”MyTest.Account.Form.CustomAction.MaxSize” GroupId=”MyTest.Account.Form.CustomAction.CustomWeb” Sequence=”51″ Size=”LargeLarge” />

</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id=”Mscrm.Templates”></RibbonTemplates>
</Templates>
<CommandDefinitions>

<CommandDefinition Id=”MyTest.Account.Form.CommandDefinition”>

<EnableRules>
<EnableRule Id=”Mscrm.Enabled” />

</EnableRules>

<DisplayRules/>

<Actions>

<Url Address =”www.google.com”></Url>

</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules/>
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels/>
</RibbonDiffXml>

 

8. Zip your solution, import it and you will get a new group like below.

In my next post I will show how to create a new tab for custom button.

Enjoy !!

Leave a Reply

Your email address will not be published. Required fields are marked *