Newer Version Available
UserRole
Supported Calls
create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), update(), upsert()
Fields
| Field | Details |
|---|---|
| CaseAccessForAccountOwner |
|
| ContactAccessForAccountOwner |
|
| DeveloperName |
|
| ForecastUserId |
|
| IsPartner |
|
| MayForecastManagerShare |
|
| Name |
|
| OpportunityAccessForAccountOwner |
|
| ParentRoleId |
|
| 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.
All users have access to invoke query or describe this object. If your client
application logs in with the “Manage Users” permission, it can query,
create, update, or delete UserRole records.
For example, the following code finds all roles that are not assigned to any
users.
1SELECT Id, Name, DeveloperName
2FROM UserRole
3WHERE Id NOT IN (SELECT UserRoleId
4 FROM User
5 WHERE UserRoleId !='000000000000000')