Object Reference for the Salesforce Platform
Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
OpportunityPartner
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), query(), retrieve()
Fields
Creating an Account-Opportunity Partner Relationship
When you create a partner relationship between an account and an opportunity (when you create a Partner record and specify the OpportunityId field), the API automatically creates two OpportunityPartner records, one for the forward relationship and one for the reverse.
- 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 the Partner and OpportunityParnter records are the same.
- If you set the IsPrimary value to 1 (true) upon insert of a new OpportunityPartner, the IsPrimary value is automatically set to 0 (false) for any existing primary partners for that opportunity.
This mapping allows the API to manage the records and their relationships efficiently.