I’m looking for a best practice regarding Account relationships. We have a scenario where a single Account needs to be linked to multiple other Accounts simultaneously.
Standard hierarchies are often limited to a 1:N (parent-child) structure, but we need to visualize all connections in one place.
Is there a native way to display these multiple associations?
Should I use a custom junction object or a “Related List”?
How do you solve the UI/UX part so it’s easy for sales reps to see all linked entities?
If you need more data associated with the relationship (ie do you want to store a type of relationship → friend, customer, competitor, supplier) then you will need a junction object, otherwise if its just a list of associated accounts then a related list is fine.
The second is fairly easy, go to studio/accounts/relationships and add a many to many relationship to accounts fill out the details, click save/deploy and you are done you will have panels in each account where you can add the relationship.
The first one will require the module builder to create a new module with fields for the additional data and TWO relationships to accounts (one to many on the first side (new module has a single field for the related account number 1 and then one to many again - so again a single field for related account number 2) this will then need deploying. I haven’t tested this setup so you may need to play with the relationship model in this instance.
For reference I have added a linking object between Accounts and Contacts (Job Roles) as several of our clients have customers with people in many roles at many of their customers, this allows us to have contacts attached to the new module (Job Role), this module links a contact to a job role and the job role (with specific role details) to a specific account. Each contact can have multiple roles and each account can have multiple Job Roles as well. In addition I have a logic hook such that when a role is added/removed the Account→Contact is maintained as well so that everything else works as normal.