CRM2011 Custom Button Max size and Scale set for Screen resolution

Custom Button Max Size and Scale Definition add for Screen resolution

Here 3 Custom Actions added:

  • The first Custom Action adds the new Group and the 2 Buttons inside that Group.
  • The second Custom Action adds the MaxSize definition for the Group to the Scaling definition of the Ribbon.  This tells CRM how to display the buttons when the screen size does not require any collapsing of the buttons.
  • The third Custom Action adds the Scale definition for the Group to the Scaling definition of the Ribbon. This tells CRM how to display the buttons when the screen size is insufficient


[RibbonDiffXml]
        [CustomActions]
          [CustomAction Id="Mscrm.Form.[[Entity Name]].CustomGroup.CustomAction" Location="Mscrm.Form.[[Entity Name]].MainTab.Groups._children" Sequence="60"]
            [CommandUIDefinition]
              [Group Id="Mscrm.Form.[[Entity Name]].CustomGroup.Group" Title="Credit" Sequence="92" Template="Mscrm.Templates.Flexible2"]
                [Controls Id="Mscrm.Form.[[Entity Name]].CustomGroup.Controls"]
                  [Button Id="Mscrm.Form.[[Entity Name]].CustomGroup.Button.[[Button1 name]]" Sequence="100" LabelText="Credit Check" ToolTipTitle="Check the Credit" TemplateAlias="o1" Image16by16="/_imgs/SFA/AlignGoal_16.png" Image32by32="/_imgs/SFA/AlignGoal_32.png" /]
                  [Button Id="Mscrm.Form.[[Entity Name]].CustomGroup.Button.[[Button2 name]]" Sequence="110" LabelText="Credit Sentence" ToolTipTitle="Credit Sentence" TemplateAlias="o1" Image16by16="/_imgs/SFA/Rollup_16.png" Image32by32="/_imgs/SFA/Rollup_32.png" /]
                [/Controls]
              [/Group]
            [/CommandUIDefinition]
          [/CustomAction]

[CustomAction Id="Mscrm.Form.[[Entity Name]].CustomGroup.MaxSize.CustomAction" Location="Mscrm.Form.[[Entity Name]].MainTab.Scaling._children" Sequence="120"]
[CommandUIDefinition]
[MaxSize Id="Mscrm.Form.[[Entity Name]].CustomGroup.MaxSize" GroupId="Mscrm.Form.[[Entity Name]].CustomGroup.Group" Sequence="21" Size="LargeLarge" /]
[/CommandUIDefinition]
[/CustomAction]

[CustomAction Id="Mscrm.Form.[[Entity Name]].CustomGroup.Popup.CustomAction" Location="Mscrm.Form.[[Entity Name]].MainTab.Scaling._children" Sequence="140"]
[CommandUIDefinition]
[Scale Id="Mscrm.Form.[[Entity Name]].CustomGroup.Popup.1" GroupId="Mscrm.Form.[[Entity Name]].CustomGroup.Group" Sequence="85" Size="Popup" /]
[/CommandUIDefinition]
[/CustomAction]


[/CustomActions]

Post a Comment

0 Comments