Dynamics CRM 2011 Ribbon Customization Index
May 5, 2011 Leave a comment
Here I am listing the index for my posts For Ribbon Customization
Sharing My Experinces with CRM 2011
May 5, 2011 Leave a comment
Here I am listing the index for my posts For Ribbon Customization
Filed under CRM 2011 Ribbon Customization Tagged with Add a Custom Button to Custom Tab, Add a custom tab to MS CRM 2011, Add Custom Button to Custom Group for an Existing Tab, Adding a button to Existing Group, Adding a Button to the CRM 2011 Form Ribbon, Adding a buttons to Grid Ribbon CRM 2011, Adding a Tab to the Existing Ribbon, crm 2011 ribbon, Hiding a Ribbon Button in CRM 2011, Ribbon Customization
April 28, 2011 1 Comment
As we have seen how to add Custom Tab,Custom Group, Custom Buttons to Display on Entity Form, Sub Grids, in my earlier post, Today we will see how to add Custom Group and Custom Buttons to an existing tab for Opportunity Entity.
To day we will perform the following tasks
1: <CustomAction Id="Sample.Grid.opportunity.CustomGroup.MaxSize.CustomAction" Location="Mscrm.HomepageGrid.opportunity.MainTab.Scaling._children" Sequence="150">
2: <CommandUIDefinition>
3: <MaxSize Id="Sample.Grid.opportunity.CustomGroup.MaxSize" GroupId="Sample.Grid.opportunity.CustomGroup.Group" Sequence="21" Size="LargeLarge" />
4: </CommandUIDefinition>
5: </CustomAction>
6:
7: <CustomAction Id="Sample.Grid.opportunity.CustomGroup.CustomAction" Location="Mscrm.HomepageGrid.opportunity.MainTab.Groups._children" Sequence="115">
8: <CommandUIDefinition>
9: <Group Id="Sample.Grid.opportunity.CustomGroup.Group" Command="Sample.Grid.opportunity.CustomGroup.Command" Title="$LocLabels:Sample.Grid.opportunity.CustomGroup.Title" Sequence="85" Template="Mscrm.Templates.3.3" >
10: <Controls Id="Sample.Grid.opportunity.CustomGroup.Controls">
11: <Button Id="Sample.Grid.opportunity.CustomGroup.Button.A" Command="Sample.Grid.opportunity.CustomGroup.Button.A.Command" Sequence="10" LabelText="$LocLabels:Sample.Grid.opportunity.CustomGroup.Button.A.LabelText" ToolTipTitle="$LocLabels:Sample.Grid.opportunity.CustomGroup.Button.A.LabelText" ToolTipDescription="$LocLabels:Sample.Grid.opportunity.CustomGroup.Button.A.Description" TemplateAlias="o1" Image16by16="/_imgs/ribbon/AddEmail_16.png" Image32by32="/_imgs/ribbon/Email_32.png" />
12: <Button Id="Sample.Grid.opportunity.CustomGroup.Button.B" Command="Sample.Grid.opportunity.CustomGroup.Button.B.Command" Sequence="20" LabelText="$LocLabels:Sample.Grid.opportunity.CustomGroup.Button.B.LabelText" ToolTipTitle="$LocLabels:Sample.Grid.opportunity.CustomGroup.Button.B.LabelText" ToolTipDescription="$LocLabels:Sample.Grid.opportunity.CustomGroup.Button.B.Description" TemplateAlias="o1" Image16by16="/_imgs/ribbon/AddEmail_16.png" Image32by32="/_imgs/ribbon/Email_32.png" />
13: </Controls>
14: </Group>
15: </CommandUIDefinition>
16: </CustomAction>
17: </CustomActions>
1: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Button.A.Description">
2: <Titles>
3: <Title languagecode="1033" description="First Button Description" />
4: </Titles>
5: </LocLabel>
6: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Button.B.Description">
7: <Titles>
8: <Title languagecode="1033" description="Second Button Description" />
9: </Titles>
10: </LocLabel>
11:
12: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Title">
13: <Titles>
14: <Title languagecode="1033" description="First Group" />
15: </Titles>
16: </LocLabel>
17: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Button.A.LabelText">
18: <Titles>
19: <Title languagecode="1033" description="First Button" />
20: </Titles>
21: </LocLabel>
22: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Button.A.ToolTipDescription">
23: <Titles>
24: <Title languagecode="1033" description="First Button" />
25: </Titles>
26: </LocLabel>
27: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Button.B.LabelText">
28: <Titles>
29: <Title languagecode="1033" description="Second Button" />
30: </Titles>
31: </LocLabel>
32: <LocLabel Id="Sample.Grid.opportunity.CustomGroup.Button.B.ToolTipDescription">
33: <Titles>
34: <Title languagecode="1033" description="Second Button" />
35: </Titles>
36: </LocLabel>
Note:This post solution contains the customizations of the earlier post as well
Filed under CRM 2011 Ribbon Customization Tagged with Add a Custom Button to Custom Tab, Add Custom Button to Custom Group for an Existing Tab, Adding a Button to the CRM 2011 Form Ribbon, Adding a buttons to Grid Ribbon CRM 2011, Adding a Custom Group to Existing Tab, crm 2011 ribbon, dynamics crm 2011
April 27, 2011 1 Comment
In my earlier post we have seen how to add custom buttons to the Entity Gird Ribbon for opportunity entity in CRM 2011
Now we will see how to add the same buttons to Entity Form level ribbon and Sub Grid Ribbon ( The Ribbon that will show when the Control is in the Sub grid with in the Opportunity Entity Form and also Sub grids showing the Opportunity Associated view)
1: <!--CustomAction for Tab, group, buttons to display in Form-->
2: <CustomAction Id="Sample.Form.opportunity.CustomTab.CustomAction" Location="Mscrm.Tabs._children" Sequence="40">
3: <CommandUIDefinition>
4: <Tab Id="Sample.Form.opportunity.CustomTab" Command="Sample.Form.opportunity.CustomTab" Title="$LocLabels:Sample.opportunity.CustomTab.Title" Description="$LocLabels:Sample.opportunity.CustomTab.Description" Sequence="40">
5: <Scaling Id="Sample.Form.opportunity.CustomTab.Scaling">
6: <MaxSize Id="Sample.Form.opportunity.CustomTab.FirstGroup.MaxSize" GroupId="Sample.Form.opportunity.CustomTab.FirstGroup" Sequence="10" Size="LargeMedium" />
7: </Scaling>
8: <Groups Id="Sample.Form.opportunity.CustomTab.Groups">
9: <Group Id="Sample.Form.opportunity.CustomTab.FirstGroup" Command="Sample.Form.opportunity.FirstGroup" Sequence="10" Title="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.Title" Template="Mscrm.Templates.3.3">
10: <Controls Id="Sample.Form.opportunity.CustomTab.FirstGroup.Controls">
11: <Button Id="Sample.Form.opportunity.CustomTab.FirstGroup.FirstButton" ToolTipTitle="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText" ToolTipDescription="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.ToolTipDescription" Command="Sample.Form.opportunity.FirstButton" Sequence="10" LabelText="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText" Alt="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText" Image16by16="/_imgs/ribbon/AddEmail_16.png" Image32by32="/_imgs/ribbon/Email_32.png" TemplateAlias="o1" />
12: <Button Id="Sample.Form.opportunity.CustomTab.FirstGroup.SecondButton" ToolTipTitle="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText" ToolTipDescription="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.ToolTipDescription" Command="Sample.Form.opportunity.SecondButton" Sequence="20" LabelText="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText" Alt="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText" Image16by16="/_imgs/ribbon/AddEmail_16.png" Image32by32="/_imgs/ribbon/Email_32.png" TemplateAlias="o1" />
13:
14: </Controls>
15: </Group>
16: </Groups>
17: </Tab>
18: </CommandUIDefinition>
19: </CustomAction>
20:
21: <!--CustomAction for Tab, group, buttons to display in Form Subgrid-->
22: <CustomAction Id="Sample.SubGrid.opportunity.CustomTab.CustomAction" Location="Mscrm.SubGrid.opportunity.ContextualTabs._children" Sequence="40">
23: <CommandUIDefinition>
24: <Tab Id="Sample.SubGrid.opportunity.CustomTab" Command="Sample.SubGrid.opportunity.CustomTab" Title="$LocLabels:Sample.opportunity.CustomTab.Title" Description="$LocLabels:Sample.opportunity.CustomTab.Description" Sequence="500">
25: <Scaling Id="Sample.SubGrid.opportunity.CustomTab.Scaling">
26: <MaxSize Id="Sample.SubGrid.opportunity.CustomTab.FirstGroup.MaxSize" GroupId="Sample.SubGrid.opportunity.CustomTab.FirstGroup" Sequence="10" Size="LargeMedium" />
27: </Scaling>
28: <Groups Id="Sample.SubGrid.opportunity.CustomTab.Groups">
29: <Group Id="Sample.SubGrid.opportunity.CustomTab.FirstGroup" Command="Sample.SubGrid.opportunity.FirstGroup" Sequence="10" Title="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.Title" Template="Mscrm.Templates.3.3">
30: <Controls Id="Sample.SubGrid.opportunity.CustomTab.FirstGroup.Controls">
31: <Button Id="Sample.SubGrid.opportunity.CustomTab.FirstGroup.FirstButton" ToolTipTitle="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText" ToolTipDescription="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.ToolTipDescription" Command="Sample.SubGrid.opportunity.FirstButton" Sequence="10" LabelText="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText" Alt="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText" Image16by16="/_imgs/ribbon/AddEmail_16.png" Image32by32="/_imgs/ribbon/Email_32.png" TemplateAlias="o1" />
32: <Button Id="Sample.SubGrid.opportunity.CustomTab.FirstGroup.SecondButton" ToolTipTitle="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText" ToolTipDescription="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.ToolTipDescription" Command="Sample.SubGrid.opportunity.SecondButton" Sequence="20" LabelText="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText" Alt="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText" Image16by16="/_imgs/ribbon/AddEmail_16.png" Image32by32="/_imgs/ribbon/Email_32.png" TemplateAlias="o1" />
33: </Controls>
34: </Group>
35: </Groups>
36: </Tab>
37: </CommandUIDefinition>
38: </CustomAction>
1: <!--Command Definetions for Tab, Group, Buttons under Form needs to be included here-->
2:
3: <CommandDefinition Id="Sample.Form.opportunity.FirstButton">
4: <EnableRules />
5: <DisplayRules />
6: <Actions>
7: <Url Address="http://www.microsoft.com"></Url>
8: </Actions>
9: </CommandDefinition>
10: <CommandDefinition Id="Sample.Form.opportunity.SecondButton">
11: <EnableRules />
12: <DisplayRules />
13: <Actions>
14: <JavaScriptFunction Library="$webresource:new_/ShowMessage.js" FunctionName="show">
15: <StringParameter Value="2" />
16: </JavaScriptFunction>
17: </Actions>
18: </CommandDefinition>
19: <CommandDefinition Id="Sample.Form.opportunity.FirstGroup">
20: <EnableRules>
21: <EnableRule Id="Mscrm.Enabled " />
22: </EnableRules>
23: <DisplayRules>
24: <DisplayRule Id="Mscrm.CanWriteOpportunity" />
25: </DisplayRules>
26: <Actions />
27: </CommandDefinition>
28: <CommandDefinition Id="Sample.Form.opportunity.CustomTab">
29: <EnableRules>
30: <EnableRule Id="Mscrm.Enabled " />
31: </EnableRules>
32: <DisplayRules>
33: <DisplayRule Id="Mscrm.CanWriteOpportunity" />
34: </DisplayRules>
35: <Actions />
36: </CommandDefinition>
37:
38: <!--Command Definetions for Tab, Group, Buttons under Form's SubGrid needs to be included here-->
39: <CommandDefinition Id="Sample.SubGrid.opportunity.FirstButton">
40: <EnableRules />
41: <DisplayRules />
42: <Actions>
43: <Url Address="http://www.microsoft.com"></Url>
44: </Actions>
45: </CommandDefinition>
46: <CommandDefinition Id="Sample.SubGrid.opportunity.SecondButton">
47: <EnableRules />
48: <DisplayRules />
49: <Actions>
50: <JavaScriptFunction Library="$webresource:new_/ShowMessage.js" FunctionName="show">
51: <StringParameter Value="2" />
52: </JavaScriptFunction>
53: </Actions>
54: </CommandDefinition>
55: <CommandDefinition Id="Sample.SubGrid.opportunity.FirstGroup">
56: <EnableRules>
57: <EnableRule Id="Mscrm.Enabled " />
58: </EnableRules>
59: <DisplayRules>
60: <DisplayRule Id="Mscrm.CanWriteOpportunity" />
61: </DisplayRules>
62: <Actions />
63: </CommandDefinition>
64: <CommandDefinition Id="Sample.SubGrid.opportunity.CustomTab">
65: <EnableRules>
66: <EnableRule Id="Mscrm.Enabled " />
67: </EnableRules>
68: <DisplayRules>
69: <DisplayRule Id="Mscrm.CanWriteOpportunity" />
70: </DisplayRules>
71: <Actions />
72: </CommandDefinition>
73:
1: <TabDisplayRule TabCommand="Sample.SubGrid.opportunity.CustomTab">
2: <EntityRule EntityName="opportunity" Context="SubGridStandard" />
3: <EntityRule EntityName="opportunity" Context="SubGridAssociated" />
4: </TabDisplayRule>
5: <TabDisplayRule TabCommand="Sample.Form.opportunity.CustomTab">
6: <EntityRule EntityName="opportunity" Context="Form" AppliesTo="PrimaryEntity" />
7: </TabDisplayRule>
Filed under CRM 2011 Ribbon Customization Tagged with Add a Custom Button to Custom Tab, Adding a Button to the CRM 2011 Form Ribbon, Adding a Button to the CRM 2011 Sub Grid Ribbon, Adding a buttons to Grid Ribbon CRM 2011, crm 2011 ribbon, dynamics crm 2011, dynamics crm 2011 ribbon, Ribbon Customization
April 27, 2011 2 Comments
In my earlier post we have seen how to add a custom tab to a specific entity
Today I am going to perform the following tasks
Coming to the Actions in sequence,
1: function show(Val)
2: {
3: alert("Button "+Val+" action performed.");
4: }
1: <CustomActions>
2: <CustomAction Id="Sample.Grid.opportunity.CustomTab.CustomAction" Location="Mscrm.Tabs._children" Sequence="40">
3: <CommandUIDefinition>
4: <Tab Id="Sample.Grid.opportunity.CustomTab" Command="Sample.Grid.opportunity.CustomTab" Title="$LocLabels:Sample.opportunity.CustomTab.Title" Description="$LocLabels:Sample.opportunity.CustomTab.Description" Sequence="500">
5: <Scaling Id="Sample.Grid.opportunity.CustomTab.Scaling">
6: <MaxSize Id="Sample.Grid.opportunity.CustomTab.FirstGroup.MaxSize" GroupId="Sample.Grid.opportunity.CustomTab.FirstGroup" Sequence="10" Size="LargeMedium" />
7: </Scaling>
8: <Groups Id="Sample.Grid.opportunity.CustomTab.Groups">
9: <Group Id="Sample.Grid.opportunity.CustomTab.FirstGroup" Command="Sample.Grid.opportunity.FirstGroup" Sequence="10" Title="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.Title" Template="Mscrm.Templates.3.3">
10: <Controls Id="Sample.Grid.opportunity.CustomTab.FirstGroup.Controls">
11: <Button Id="Sample.Grid.opportunity.CustomTab.FirstGroup.FirstButton" ToolTipTitle="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText"
12: ToolTipDescription="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.ToolTipDescription"
13: Command="Sample.Grid.opportunity.FirstButton"
14: Sequence="10"
15: LabelText="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText"
16: Alt="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText"
17: Image16by16="/_imgs/ribbon/AddEmail_16.png"
18: Image32by32="/_imgs/ribbon/Email_32.png" TemplateAlias="o1" />
19: <Button Id="Sample.Grid.opportunity.CustomTab.FirstGroup.SecondButton"
20: ToolTipTitle="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText"
21: ToolTipDescription="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.ToolTipDescription"
22: Command="Sample.Grid.opportunity.SecondButton"
23: Sequence="20"
24: LabelText="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText"
25: Alt="$LocLabels:Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText"
26: Image16by16="/_imgs/ribbon/AddEmail_16.png"
27: Image32by32="/_imgs/ribbon/Email_32.png" TemplateAlias="o1" />
28:
29: </Controls>
30: </Group>
31: </Groups>
32: </Tab>
33: </CommandUIDefinition>
34: </CustomAction>
35: </CustomActions>
1: <Templates>
2: <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
3: </Templates>
1: <CommandDefinitions>
2: <CommandDefinition Id="Sample.Grid.opportunity.CustomTab">
3: <EnableRules>
4: <EnableRule Id="Mscrm.Enabled " />
5: </EnableRules>
6: <DisplayRules>
7: <DisplayRule Id="Mscrm.CanWriteOpportunity" />
8: </DisplayRules>
9: <Actions />
10: </CommandDefinition>
11: <CommandDefinition Id="Sample.Grid.opportunity.FirstGroup">
12: <EnableRules>
13: <EnableRule Id="Mscrm.Enabled " />
14: </EnableRules>
15: <DisplayRules>
16: <DisplayRule Id="Mscrm.CanWriteOpportunity" />
17: </DisplayRules>
18: <Actions />
19: </CommandDefinition>
20: <CommandDefinition Id="Sample.Grid.opportunity.FirstButton">
21: <EnableRules/>
22: <DisplayRules/>
23: <Actions>
24: <Url Address ="http://www.microsoft.com"></Url>
25: </Actions>
26: </CommandDefinition>
27: <CommandDefinition Id="Sample.Grid.opportunity.SecondButton">
28: <EnableRules/>
29: <DisplayRules/>
30: <Actions>
31: <JavaScriptFunction Library="$webresource:new_/ShowMessage.js" FunctionName="show">
32: <StringParameter Value="2" />
33: </JavaScriptFunction>
34: </Actions>
35: </CommandDefinition >
1: <RuleDefinitions>
2: <TabDisplayRules>
3: <TabDisplayRule TabCommand="Sample.Grid.opportunity.CustomTab">
4: <EntityRule EntityName="opportunity" Context="HomePageGrid" />
5: </TabDisplayRule>
6: </TabDisplayRules>
7: <DisplayRules/>
8: <EnableRules />
9: </RuleDefinitions>
1: <LocLabels>
2: <LocLabel Id="Sample.opportunity.CustomTab.FirstGroup.FirstButton.LabelText">
3: <Titles>
4: <Title languagecode="1033" description="First Button" />
5: </Titles>
6: </LocLabel>
7: <LocLabel Id="Sample.opportunity.CustomTab.Description">
8: <Titles>
9: <Title languagecode="1033" description="A custom tab for the Opportunity entity." />
10: </Titles>
11: </LocLabel>
12: <LocLabel Id="Sample.opportunity.CustomTab.FirstGroup.Title">
13: <Titles>
14: <Title languagecode="1033" description="First Group" />
15: </Titles>
16: </LocLabel>
17: <LocLabel Id="Sample.opportunity.CustomTab.FirstGroup.FirstButton.ToolTipDescription">
18: <Titles>
19: <Title languagecode="1033" description="The first button in the first group." />
20: </Titles>
21: </LocLabel>
22: <LocLabel Id="Sample.opportunity.CustomTab.Title">
23: <Titles>
24: <Title languagecode="1033" description="Custom Tab" />
25: </Titles>
26: </LocLabel>
27: <LocLabel Id="Sample.opportunity.CustomTab.FirstGroup.SecondButton.LabelText">
28: <Titles>
29: <Title languagecode="1033" description="Second Button" />
30: </Titles>
31: </LocLabel>
32: <LocLabel Id="Sample.opportunity.CustomTab.FirstGroup.SecondButton.ToolTipDescription">
33: <Titles>
34: <Title languagecode="1033" description="The second button in the first group." />
35: </Titles>
36: </LocLabel>
37: </LocLabels>
Happy Learning
Filed under CRM 2011 Ribbon Customization Tagged with Add a Custom Button to Custom Tab, Add a custom tab to MS CRM 2011, Adding a buttons to Grid Ribbon CRM 2011, Adding a Tab to the Existing Ribbon, Adding Actions to Buttons, crm 2011 ribbon, dynamics crm 2011, dynamics crm 2011 ribbon, Ribbon Customization
April 13, 2011 1 Comment
In this post we will see how to add a custom tab to specific entity. I am choosing to add a Custom Tab with name “myCustomTab” to the “Opportunity” Entity
5. To understand the structure of the Ribbon available for Opportunity entity SDK has given all entity ribbon xmls and you can find out at sdk\samplecode\cs\client\ribbon\exportribbonxml\exportedribbonxml\ and you can select the “opportunityribbon.xml” in the Visual studio.
6. Understand how the existing tabs has been created in the “opportunityribbon.xml” and refer my earlier posts for better understanding on Ribbon customization.
7. The <RibbonDiffXml> in the Opportunity entity appears as below
<RibbonDiffXml>
<CustomActions>
<CustomAction Id =”Mscrm.Isv.GlobalCustomAction” Location=”Mscrm.Tabs._children” Sequence=”500″ Title=”myCustomAction” >
<CommandUIDefinition>
<Tab Id=”Mscrm.HomepageGrid.opportunity.CustomTab” Command=”Mscrm.HomepageGrid.opportunity.CustomTab” Title=”myCustomTab” Description=”myCustomTab” Sequence=”300″>
<Scaling Id=”Mscrm.HomepageGrid.opportunity.CustomTab.Scaling”>
<MaxSize Id=”Mscrm.HomepageGrid.opportunity.CustomTab.CustomGroup.MaxSize” GroupId=”Mscrm.HomepageGrid.opportunity.CustomTab.CustomGroup” Sequence=”20″ Size=”LargeMedium” />
<Scale Id=”Mscrm.HomepageGrid.opportunity.CustomTab.CustomGroup.Scale.1″ GroupId=”Mscrm.HomepageGrid.opportunity.CustomTab.CustomGroup” Sequence=”120″ Size=”LargeSmall” />
</Scaling>
<Groups Id=”Mscrm.HomepageGrid.opportunity.CustomTab.Groups”>
</Groups>
</Tab>
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id=”Mscrm.Templates”></RibbonTemplates>
</Templates>
<CommandDefinitions/>
<RuleDefinitions>
<TabDisplayRules>
<TabDisplayRule TabCommand =”Mscrm.HomepageGrid.opportunity.CustomTab” >
<EntityRule AppliesTo =”SelectedEntity” EntityName =”opportunity” Context =”HomePageGrid”/>
</TabDisplayRule>
</TabDisplayRules>
<DisplayRules/>
<EnableRules />
</RuleDefinitions>
<LocLabels/>
</RibbonDiffXml>
8. The end Result is as shown in the below screenshot
9. Download the unmanaged solution from here
April 12, 2011 2 Comments
Revisit my earlier post and dig in to the details of how we added a tab and also button to the tab.
So we added the following Custom Action
4. < CommandUIDefinition > can contain any type (for ex: button,tab etc.,) what is displayed in the above Screenshot. But we are interested to add Tab,So refer the screenshot for the Properties and the elements Tabtaype contains so we added the following < CommandUIDefinition >
< CommandUIDefinition >
<Tab Id=”Mscrm.Isv.Global” Command=”Mscrm.Isv.Global” Description=”Custom Tab” Title=”Custom Tab” Sequence=”1000″>
<Scaling Id=”Mscrm.Isv.Global.Scaling”>
<MaxSize Id=”Mscrm.Isv.Global.Group0.MaxSize” Sequence=”10″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Large” />
<Scale Id=”Mscrm.Isv.Global.Group0.Scale.Medium” Sequence=”20″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Medium” />
<Scale Id=”Mscrm.Isv.Global.Group0.Scale.Small” Sequence=”30″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Small” />
<Scale Id=”Mscrm.Isv.Global.Group0.Scale.Popup” Sequence=”40″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Popup” />
</Scaling>
<Groups Id=”Mscrm.Isv.Global.Groups”>
<Group Id=”Mscrm.Isv.Global.Group0″ Sequence=”10″ Command=”Mscrm.Isv.Global.Group0″ Title=”Custom Group1″ Description=”Custom Group1″ Template=”Mscrm.Templates.Flexible”>
<Controls Id=”Mscrm.Isv.Global.Group0.Controls”>
<Button Id=”Mscrm.Isv.Global.Group0.Control0″ Command=”Mscrm.Isv.Global.Group0.Control0″ LabelText=”$LocLabels:Mscrm.Isv.Global.Group0.Control0.LocLabel” ToolTipTitle=”$LocLabels:Mscrm.Isv.Global.Group0.Control0.LocLabel” ToolTipDescription=”$LocLabels:Mscrm.Isv.Global.Group0.Control0.ToolTip.LocLabel” Image16by16=”/_imgs/area/18_home.gif” Image32by32=”/_imgs/area/18_home.gif” Image16by16Class=”ms-crm-Upgraded-Ribbon-Image16″ Image32by32Class=”ms-crm-Upgraded-Ribbon-Image32″ Sequence=”10″ TemplateAlias=”o1″ />
</Controls>
</Group>
</Groups>
</Tab>
</CommandUIDefinition>
5. After this we need to specify the <CommandDefinitions> which Specifies a set of rules that control how a ribbon element is displayed and actions to perform that can be referenced by ribbon elements and controls See the below screenshot for how the Command definition should be done
<CommandDefinitions>
<CommandDefinition Id=”Mscrm.Isv.Global.Group0.Control0″>
<EnableRules />
<DisplayRules>
<DisplayRule Id=”Mscrm.Isv.Global.Group0.Control0″ />
</DisplayRules>
<Actions>
</Actions>
</CommandDefinition>
<CommandDefinition Id=”Mscrm.Isv.Global”>
<EnableRules />
<DisplayRules>
<DisplayRule Id=”Mscrm.Isv.Global” />
</DisplayRules>
<Actions />
</CommandDefinition>
<CommandDefinition Id=”Mscrm.Isv.Global.Group0″>
<EnableRules />
<DisplayRules />
<Actions />
</CommandDefinition>
</CommandDefinitions>
6. Then we need to add the Rule definetions. Please check the below screenshot for the details how the Rule definitions should be configured so we added
<RuleDefinitions>
<TabDisplayRules>
<TabDisplayRule TabCommand=”Mscrm.Isv.Global”>
<PageRule Address=”*” />
</TabDisplayRule>
</TabDisplayRules>
<DisplayRules>
<DisplayRule Id=”Mscrm.Isv.Global”>
<OrRule>
<Or>
<CrmClientTypeRule Type=”Web” />
</Or>
</OrRule>
</DisplayRule>
<DisplayRule Id=”Mscrm.Isv.Global.Group0.Control0″>
<CrmOfflineAccessStateRule State=”Offline” InvertResult=”true” />
</DisplayRule>
</DisplayRules>
<EnableRules />
</RuleDefinitions>
7. At the End we have added thee Lockables where you can specify the text to display in the ribbon labels and tooltips
<LocLabel Id=”Mscrm.Isv.Global.Group0.Control0.LocLabel”>
<Titles>
<Title languagecode=”1033″ description=”Custom Button” />
</Titles>
</LocLabel>
<LocLabel Id=”Mscrm.Isv.Global.Group0.Control0.ToolTip.LocLabel”>
<Titles>
<Title languagecode=”1033″ description=”Custom Button” />
</Titles>
</LocLabel>
</LocLabels>
April 12, 2011 10 Comments
If you need the basics on Ribbon customization please check my earlier blog MS Dynamics CRM 2011 :Ribbon Customization Part-1
Today we will look at how to add a tab and a custom button to the tab to the existing CRM 2011 ribbon
<ImportExportXml xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<Entities></Entities>
<Roles></Roles>
<Workflows></Workflows>
<FieldSecurityProfiles></FieldSecurityProfiles>
<Templates />
<RibbonDiffXml>
<CustomActions />
<Templates>
<RibbonTemplates Id=”Mscrm.Templates”></RibbonTemplates>
</Templates>
<CommandDefinitions />
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
<EntityMaps />
<EntityRelationships />
<OrganizationSettings />
<optionsets />
<Languages>
<Language>1033</Language>
</Languages>
</ImportExportXml>
6. Now our task is to add a Tab to the Ribbon . as from our earlier post we know that whatever we need to do(Add, Remove, Hide items) on the Ribbon we need to do under CustomActions
7. Adding a Custom Action By Specifying the CustomAction
<CustomAction Id=”Mscrm.ISV.MyCustomTabAction” Location=”Mscrm.Tabs._children” Sequence=”1000″>
<CommandUIDefinition><Tab Id=”Mscrm.ISV.MyCustomTab” Command=”Mscrm.ISV.MyCustomTabCommand” Description=”Custom Tab” Title=”Custom Tab” Sequence=”1000″>
<Scaling Id=”Mscrm.Isv.Global.Scaling”>
<MaxSize Id=”Mscrm.Isv.Global.Group0.MaxSize” Sequence=”10″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Large” />
<Scale Id=”Mscrm.Isv.Global.Group0.Scale.Medium” Sequence=”20″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Medium” />
<Scale Id=”Mscrm.Isv.Global.Group0.Scale.Small” Sequence=”30″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Small” />
<Scale Id=”Mscrm.Isv.Global.Group0.Scale.Popup” Sequence=”40″ GroupId=”Mscrm.Isv.Global.Group0″ Size=”Popup” />
</Scaling>
<Groups Id=”Mscrm.Isv.Global.Groups”>
<Group Id=”Mscrm.Isv.Global.Group0″ Sequence=”10″ Command=”Mscrm.Isv.Global.Group0″ Title=”Custom Group1″ Description=”Custom Group1″ Template=”Mscrm.Templates.Flexible”>
</Group>
</Groups>
</Tab>
</CommandUIDefinition>
</CustomAction>
8. Specify the Command Definition
<CommandDefinitions>
<CommandDefinition Id=”Mscrm.ISV.MyCustomTabCommand”>
<EnableRules />
<DisplayRules>
<DisplayRule Id=”Mscrm.ISV.MyCustomTabCommand” />
</DisplayRules>
<Actions />
</CommandDefinition>
<CommandDefinition Id=”Mscrm.Isv.Global.Group0″>
<EnableRules />
<DisplayRules />
<Actions />
</CommandDefinition>
</CommandDefinitions>
9. Specify the display Rule
<DisplayRule Id=”Mscrm.ISV.MyCustomTabAction”>
<OrRule>
<Or>
<CrmClientTypeRule Type=”Web” />
</Or>
</OrRule>
</DisplayRule>
10. Save the Customization file, Zip the Solution and import the Solution and Refresh the Web page you can see the Custom Tab with the Custom Button inside a Custom Group and the ribbon now looks like as shown in the screenshot.
The entire customization file can be Downloaded here .
Unmanaged Solution can be downloaded here
Filed under CRM 2011 Ribbon Customization Tagged with Add a Custom Button to Custom Tab, Add a custom tab to MS CRM 2011, Adding a Tab to the Existing Ribbon, crm 2011 add button ribbon, crm 2011 isv tab, crm 2011 ribbon, crm 2011 ribbon customization, CRM Customization, dynamics crm 2011, dynamics crm 2011 ribbon, Ribbon Customization