Role

Represents a role in your organization.

Parent Type 

This type extends RoleOrTerritory and inherits its fields.

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 

Introduced in API version 24.0.

Fields 

fullName 

  • Type: string
  • Required: No
  • Description: 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 

  • Type: string
  • Required: No
  • Description: 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.