OpportunityShare

Represents a sharing entry on an Opportunity.

Supported Calls

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

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
IsDeleted
Type
boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
OpportunityAccessLevel
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Level of access that the user or group has to the opportunity. The possible values are:
  • Read
  • Edit
  • All—This value is not valid when creating, updating, or deleting records.
This field must be set to an access level that’s higher than the org’s default access level for opportunities.
OpportunityId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the opportunity associated with this sharing entry. This field can’t be updated.
RowCause
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Reason that this sharing entry exists. You can 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.
Valid values include:
  • Owner—User is the owner of the opportunity.
  • Manual—User or group has access because a user with “All” access manually shared the opportunity with the user or group.
  • Rule—User or group has access via an opportunity sharing rule.
  • ImplicitChild—User or group has access to the opportunity on the account associated with this opportunity.
  • Sales Team—User has access to the opportunity because the user is on the opportunity sales team for the opportunity. The OpportunityTeamMember object sets the access level. See OpportunityTeamMember for more information.
UserOrGroupId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the user or group that has been given access to the opportunity. This field can’t be updated.

Usage

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

If you attempt to create a record that matches an existing record, any modified fields are updated, the system returns the existing record.

If an opportunity is shared in multiple ways with a user, you don’t always see multiple sharing records. If a user has access to an opportunity for one or more of the following RowCause values, the records in the OpportunityShare object are compressed into one record with the highest level of access.

See Also