Newer Version Available
Role
Declarative Metadata File Suffix and Directory Location
The file suffix for role components is .role and components are stored in the roles directory of the corresponding package directory.
Version
Role components are available in API version 24.0 and later.
Fields
This metadata type extends to subtype RoleOrTerritory.
| Field Name | Field Type | Description |
|---|---|---|
| fullName | string | The unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the Metadata component. Corresponds to Role Name in the user interface. |
| parentRole | string | The role above this role in the hierarchy. |
Declarative Metadata Sample Definition
The following is the definition of a
role.
1<?xml version="1.0" encoding="UTF-8"?>
2<Role xmlns="http://soap.sforce.com/2006/04/metadata">
3 <caseAccessLevel>Edit</caseAccessLevel>
4 <contactAccessLevel>Edit</contactAccessLevel>
5 <description>Sample Role</description>
6 <mayForecastManagerShare>false</mayForecastManagerShare>
7 <name>R22</name>
8 <opportunityAccessLevel>Read</opportunityAccessLevel>
9</Role>Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.