UserRole
Supported Calls
create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), update(), upsert()
Special Access Rules
As of Summer ’20 and later, only users with the View Roles and Role Hierarchy permission can access this object, and only users with the Manage Roles permission can edit this object.
Fields
| Field | Details |
|---|---|
| CaseAccessForAccountOwner |
|
| ContactAccessForAccountOwner |
|
| DeveloperName |
|
| ForecastUserId |
|
| IsPartner |
|
| MayForecastManagerShare |
|
| Name |
|
| OpportunityAccessForAccountOwner |
|
| ParentRoleId |
|
| PortalAccountId |
|
| PortalAccountOwnerId |
|
| PortalRole |
|
| PortalType |
|
| RollupDescription |
|
Usage
Use this object to query the set of currently configured user roles in your organization. Use it in your client application to obtain valid UserRole IDs to use when querying or modifying a User record.
1SELECT Id, Name, DeveloperName
2FROM UserRole
3WHERE Id NOT IN (SELECT UserRoleId
4 FROM User
5 WHERE UserRoleId !='000000000000000')