Partner
Supported Calls
create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()
Fields
Roles
In the Salesforce user interface, system administrators can set up the valid role values and their corresponding reverse role values in the PartnerRole object. Each account in the relationship is assigned a Role (such as Consultant or Distributor) designating that account’s role toward the related account or opportunity.
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.
Creating an Account-Account Partner Relationship
When you create a partner relationship between two accounts (when you create a Partner record and specify the AccountFromId), the API automatically creates two AccountPartner records, one for the forward relationship and one for the reverse. For example, if you create a Partner relationship with “Acme, Inc.” as the AccountFromId and “Acme Consulting” as the AccountToId, the API automatically creates two AccountPartner records:
- The forward relationship AccountPartner with “Acme, Inc.” as the AccountFromId and “Acme Consulting” as the AccountToId.
- The reverse relationship AccountPartner with “Acme Consulting” as the AccountFromId and “Acme, Inc.” as the AccountToId.
- The value of the Role field in the reverse relationship AccountPartner is set to the PartnerRole record ReverseRole value associated with the value of the Role field in the forward relationship AccountPartner.
This mapping allows the API to manage the records and their relationships efficiently.