<EntityPrivilegeRule> (RibbonDiffXml)

 

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

Specifies a rule that can detect the current user's permissions for a specific entity.

Syntax

<EntityPrivilegeRule 
 AppliesTo=["PrimaryEntity" | " SelectedEntity "]
 Default =["0" | "1" | "true" | "false"]
 EntityName="String" 
 InvertResult =["0" | "1" | "true" | "false"]
 PrivilegeDepth=["None" | "Basic" | "Local" | "Deep" | "Global"] 
 PrivilegeType=["Create" | "Read" | "Write" | "Delete" | "Assign" | "Share" | "Append" | "AppendTo"]
/>

Attributes and Elements

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

Attributes

Attribute

Description

Type

Usage

AppliesTo

Determines whether the rule applies to the entity record being displayed in the form or entity records being displayed in a sub-grid.

Valid values:

Value

Description

PrimaryEntity

For a form or Subgrid ribbon, the rule applies to the entity displayed in the form. This option does not apply for a Grid Ribbon.

SelectedEntity

For a Grid or Subgrid ribbon this rule applies to the entity that appears in the grid.

String

Optional

Default

Sets the default return value for the rule if the actual value cannot be determined.

Boolean

Optional

EntityName

Specifies the entity that this rule will apply to. Use the entity logical name, for example, "new_customentity".

String

Optional

InvertResult

Negates the return value of the rule.

Boolean

Optional

PrivilegeDepth

The Privilege Depth criteria to check.

Valid values:

Value

Description

None

No access is allowed.

Basic

This access level exposes to a user entity instances he or she owns, objects that are shared with the user, and objects that are shared with a team of which the user is a member. The application refers to this access level as User.

Local

This access level exposes to a user entity instances in the user's business unit. The application refers to this access level as Business Unit.

Deep

This access level exposes to a user entity instances in the user's business unit and all business units subordinate to the user's business unit. The application refers to this access level as Parent: Child Business Units.

Global

This access level exposes to a user all entity instances within the organization, regardless of the business unit hierarchical level to which the instance or the user belongs. The application refers to this access level as Organization.

Enumeration

Required

PrivilegeType

The type of privilege to check.

Valid values:

Value

Description

Create

To create new entity instances for this entity.

Read

To view a records of this entity.

Write

To update an entity instance.

Delete

To delete a record for this entity.

Assign

To change the owner of user-owned instances of an entity.

Share

To assign specific privileges to another user for an entity instance.

Append

To associate a selected entity instance to another entity instance.

AppendTo

To associate an entity instance to this entity instance.

Enumeration

Required

Child Elements

This element has no child elements.

Parent Elements

Element

Description

<<DisplayRule> (RibbonDiffXml)

Specifies either the definition of a rule used to display a ribbon element or a reference to a DisplayRule from a command definition.

<Or> (RibbonDiffXml)

Specifies a set of rules that must be evaluated together.

Remarks

If you do not provide a value for EntityName, you must specify AppliesTo = PrimaryEntity.

Element Information

XPath

//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/EntityPrivilegeRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/OrRule/Or/EntityPrivilegeRule

Schema Name

EntityPrivilegeRuleType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

See Also

Ribbon XML reference
Customize commands and the ribbon

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright