Partner

Represents a partner relationship between two Accounts or between an Opportunity and an Account.

Note
This object is completely independent of and distinct from PRM Portal functionality.

Supported Calls

create(), delete(), query(), retrieve(), getDeleted(), getUpdated(), describeSObjects()

Special Access Rules

  • You must have the “View All Data” permission to access this object via the API. All of the Partner fields are accessible in the describeSObjects() and query() calls. You cannot update() or upsert() partners via the API.
  • Customer Portal users cannot access this object.

Fields

Field Field Type Field Properties Description
AccountFromId reference Create

Filter

Nillable

Required if OpportunityId is null. ID of the main Account in a partner relationship between two accounts. Specifying this field when calling create() creates two AccountPartner objects, one for each direction of the relationship. If you specify the OpportunityId field, you cannot specify this field as well. For information on IDs, see ID Field Type.
AccountToId reference Create

Filter

Required. ID of the Partner Account related to either an opportunity or an account. You must specify this field when creating an opportunity Partner or an Account Partner.
IsDeleted boolean Defaulted on create

Filter

Indicates whether the record has been moved to the Recycle Bin (true) or not (false). Label is Deleted.

IsPrimary boolean Create

Defaulted on create

Filter

Valid for Opportunity Partners only.

Indicates that the account is the primary partner for the opportunity. Only one account can be marked as primary for an opportunity. If you set this field to 1 (true) upon insert of a new opportunity partner, any other primary partners for that opportunity will automatically have this field set to 0 (false).

Label is Primary.

OpportunityId reference Create

Filter

Nillable

Required if AccountFromId is null. ID of the Opportunity in a partner relationship between an Account and an Opportunity. Specifying this field when calling create() creates an OpportunityPartner. If you specify the AccountFromId field, you cannot specify this field as well.
Role picklist Create

Filter

Nillable

UserRole that the account has towards the related opportunity or account (for example, consultant or distributor).

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 towards 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 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.

Creating an Account-Account Partner Relationship

When you create a partner relationship between two accounts (when you create a Partner object and specify the AccountFromId), the API automatically creates two AccountPartner objects, one for the forward relationship and one for the reverse. For example, if you create a Partner object with “Acme, Inc.” as the AccountFromId and “Acme Consulting” as the AccountToId, the API automatically creates two AccountPartner objects:
This mapping allows the API to manage the objects and their relationship efficiently.
See Also:
AccountPartner
OpportunityPartner
UserRole
PartnerRole
© Copyright 2000-2008 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.