Nerd @ Work

Nerd @ Work

Getting my hands dirty with ideas

  • Home
  • Podcasts
    • Nerd @ Work Lab Podcast 🇮🇹
    • Salesforce Salary Survey Italia 2025-2026 🇮🇹
    • Salesforce Sidekicks 🇮🇹
  • About Me
  • The Trailblazers
  • Subscribe

[Salesforce] The Sobject Crusade: AccountPartner

April 12, 2016 — Enrico Murru • Post
Spread the love

Back to the Sobject Crusade list.

Source: AccountPartner

This object links 2 accounts in a partnership relation.

To create a new AccountPartner object, add the Partners related list on the Account object:

Click the New button and add as many Account partners as you want, setting also a role in the partnership:

This action populates the related list:

Note that, on the other Account’s related list, there will be the same relationship but with a different type:

This means that for each partner relationship we’ll have 2 object:

  • One AccountPartner for the wanted relation (with the specified role type)
  • One AccountPartner for the reverse relation (with the “reverse” role type)

The reverse value of the role is taken from the PartnerRole object in the ReverseRole field.

The AccountPartner records can be created also in the Opportunity’s Partners related list, and the records will come with the OpportunityId field set and a Primary flag:

That outputs in the related list:

And in the main Account object:

From the SOQL point of view let’s execute the following query:

Select Id, AccountFrom.Name, AccountTo.Name, Opportunity.Name, Role, IsPrimary from AccountPartner Where AccountFromId = ‘00124000003vaBu’ or AccountToId=’00124000003vaBu’

Account • Crusade • Opportunity • Partner • Role • Salesforce
Previous: [Salesforce] The Sobject Crusade: AccountShare
Next: [Salesforce] The Sobject Crusade: AccountTerritorySharingRule

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Gold Sponsors

Salesforce Salary Survey 2025-2026
ORGanizer for Salesforce Extension




Read my books


Awards

Top Salesforce Dev Blogs Mason Frank Top Salesforce Expert 2017

Archives

© 2025 Nerd @ Work — Powered by Vibes and Cursor