<ContextualGroup> (RibbonDiffXml)

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Contains a collection of tabs to be displayed within a specific context.

Syntax

<ContextualGroup
 Color=[ "None" | "DarkBlue" | "LightBlue" | "Teal" | "Orange" | "Green" | "Magenta" | "Yellow" | "Purple"]
 Command="String"
 ContextualGroupId="String"
 Id="String"
 Sequence="Integer"
 Title="String" >
  <Tab />
</ContextualGroup>

Attributes and Elements

The following table lists the attributes, child elements, and parent elements.

Attributes

Attribute

Description

Type

Usage

Color

Specifies a color scheme for the group.

Valid values include:

  • None

  • DarkBlue

  • LightBlue

  • Teal

  • Orange

  • Green

  • Magenta

  • Yellow

  • Purple

Enumeration

Optional

Command

Specifies the ID of the ribbon command for this control.

String

Optional

ContextualGroupId

A string that identifies the contextual group, such as Mscrm.VisualizationTools.

String

Optional

Id

Specifies a unique identifier for the definition of a ribbon element. The strongly recommended naming convention is to use a period to separate the parts of the name like so: [solution identifier].[entity].[ribbon].[function].[element name]. For example: MyISV.account.form.SendToOtherSystem.Button.

Use the {!EntityLogicalName} token in the Id attribute when you define a ribbon element that will be used for multiple entities. This inserts the entity logical name into the Id value to make sure that the Id value is globally unique.

For example, if you use MyISV.{!EntityLogicalName}.form.SendToOtherSystem.Button with the account entity, the Id will be MyISV.account.form.SendToOtherSystem.Button. For the contact entity, the Id will be MyISV.contact.form.SendToOtherSystem.Button.

Important

If you don’t set a globally unique Id value, the ribbon might not display.

String

Required

Sequence

Specify the location of the ribbon modification by setting the Sequence value higher or lower than existing ribbon elements.

Integer

Optional

Title

This element is not used in Microsoft Dynamics 365.

String

Optional

Child Elements

Element

Description

<Tab> (RibbonDiffXml)

Specifies a tab in the ribbon.

Parent Elements

Element

Description

<CommandUIDefinition> (RibbonDiffXml)

Specifies the visible Ribbon elements to be included within a CustomAction element.

Remarks

When you export a ContextualGroup that you have previously defined you may see that the ContextualGroup and any <Tab> (RibbonDiffXml) elements that it contains are refactored into separate <CustomAction> (RibbonDiffXml) elements. This is due to the way that Microsoft Dynamics 365 (online & on-premises) stores the data in the database. It does not change the behavior of the original definition.

For example, if you define a <CustomAction> (RibbonDiffXml) to add a ContextualGroup as shown in the following pseudo code snippet:

<CustomAction Location='Mscrm.ContextualGroups._children' >   <CommandUIDefinition>      <ContextualGroup Id='CG1'>         <Tab Id='T1'>...</Tab>         <Tab Id='T2'>...</Tab>      </ContextualGroup>   </CommandUIDefinition></CustomAction>

When you later export customizations including this definition, you should expect that the definition will appear as shown in the following pseudo code snippet:

<CustomAction Location='Mscrm.ContextualGroups._children' >   <CommandUIDefinition>      <ContextualGroup Id='CG1' />   </CommandUIDefinition></CustomAction><CustomAction Location='CG1._children'>   <CommandUIDefinition>      <Tab Id='T1'>...</Tab>   </CommandUIDefinition></CustomAction><CustomAction Location='CG1._children'>   <CommandUIDefinition>      <Tab Id='T2'>...</Tab>   </CommandUIDefinition></CustomAction>

Element Information

XPath

//RibbonDiffXml/CustomActions/CustomAction/CommandUIDefinition/ContextualGroup

Schema Name

ContextualGroupType

Validation File

RibbonWSS.xsd

Can be Empty

Yes

See Also

Customize commands and the ribbon
Ribbon XML reference

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright