UserShare

Represents a sharing entry on a user record. This object is available in API version 26.0 and later.

Supported Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

Special Access Rules

Customer Portal users can't access this object.

Fields

The properties available for some fields depend on the default organization-wide sharing settings. The properties listed are true for the default settings of such fields.

Field Details
IsActive
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Read-only. Indicates whether the User has access to log in (true) or not (false). You can modify a User's active status from the user interface or via the API.
RowCause
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Reason that this sharing entry exists. You can only write to this field when its value is either omitted or set to Manual (default).
You can create a value for this field in API versions 32.0 and later with the correct organization-wide sharing settings.
Possible values include:
  • Manual—The User or Group has access to the user record because a User with “All” access manually shared the User with them.
  • Rule—The User or Group has access to the user record via a User sharing rule.
UserAccessLevel
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Level of access that the User or Group has to the specified user. The specified user is denoted by the UserId. The possible values are:
  • Read
  • Edit
This field must be set to an access level that is at least equal to the organization’s default UserAccessLevel.

UserAccessLevel can be updated only if RowCause is set to Manual Sharing.

UserId
Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the User being shared.
UserOrGroupId
Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the User or Group that has been given access to the User. This field can’t be updated.

Usage

This object allows you to determine which users and groups can view or edit User records owned by other users.