function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jeff ThroneJeff Throne 

I have a contact related to 3 accounts, how do I see easily which accounts they are related to?

I recently started using related contacts and I have been setting up contacts that related to multiple accounts, but I want to easily be able to see a list of the accounts they are related to.  Ideally I would love to click on the contact name and have them listed on the contact card or something similar.
Best Answer chosen by Jeff Throne
SEKAR RAJ.SEKAR RAJ.
Hi Jeff,
On contact page layout, add the Related Account List as a Related List. Then you can able to see the related accounts for that contact.
User-added image
Thanks,
SEKAR RAJ

All Answers

Raj VakatiRaj Vakati
The simple way is .. 

Go to  the list view and sort based on the Account name you can able see or write the lightning component to see from the contact 

User-added image
Jeff ThroneJeff Throne
If I sort by account name how would I see that the contact is associated with another account?  For Example if the account name is ABC Bar and the contact is Tom Smith but he is also associated with ZYX Bar then they would not appear on the list near each other to know it is the same person.
Raj VakatiRaj Vakati
you are correct ..i dnt read your question completely  ..  

You need to create a custom component to see the list of accounts related to .. 



 
SEKAR RAJ.SEKAR RAJ.
Hi Jeff,
On contact page layout, add the Related Account List as a Related List. Then you can able to see the related accounts for that contact.
User-added image
Thanks,
SEKAR RAJ
This was selected as the best answer
Jeff ThroneJeff Throne
How do I go about creating a custom component?
SEKAR RAJ.SEKAR RAJ.
Hi Jeff,
If you are going for a custom solution, Create a lightning component where use the hasRecordId interface to get the current contact id from the URL hack.
Then based on the contact Id, You can display all the related account details on the lightning data table and add created lightning component in the contact page.
This solution also solves your issue.

Thanks,
SEKAR RAJ