Newer Version Available

This content describes an older version of this product. View Latest

OpportunityPartner

This read-only object represents a partner relationship between an Account and an Opportunity. This object is automatically created when a Partner object is created for a partner relationship between an account and an opportunity.

Supported Calls

describeSObjects(), query(), retrieve()

Fields

Field Details
AccountToId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the partner Account in the partner relationship.
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.
IsPrimary
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the account is the opportunity’s primary partner (true) or not (false). Label is Primary.
OpportunityId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the Opportunity that is in the partner relationship.
Role
Type
picklist
Properties
Filter, Group, Nillable, Sort
Description
The UserRole that the Account has on the Opportunity. For example, Reseller or Manufacturer.

Creating an Account-Opportunity Partner Relationship

When you create a partner relationship between an account and an opportunity (when you create a Partner object and specify the OpportunityId field), the API automatically creates an OpportunityPartner with the corresponding values:

  • The value of the Partner field AccountToId maps to the value of the OpportunityPartner field AccountToId.
  • The values of the OpportunityId, Role, and IsPrimary fields in both objects are the same.
  • If you set the IsPrimary value to 1 (true) upon insert of a new OpportunityPartner, any other existing primary partners for that opportunity will automatically have the IsPrimary value set to 0 (false).

This mapping allows the API to manage the objects and their relationship efficiently.