I am a newbie in salesforce

I have a custom object say X which has master detail relationship with Account.

Now I want to display the list of contacts related to account under the custom object X.

how can I display this?

Any help would be appreciated.


This depends on how you want to display them.

The easiest would be a Report using Accounts with Contacts report type. With that you can just set the Grouping to be by Lookup (Master Detail) field on Accounts. This will group all the Contacts related to Accounts related to the X objects.

If you want them to appear as a Related List on the Page Layout you will need to have a direct relationship from the Contacts to the X Object. It does not need to be Master Detail. This can be set via automation in numerous ways.

  • Thanks for the direction. I have created a report with Accounts with Contacts report type and grouped by account name. So, if I want to know to which X object record the account belongs to. Can I know from the report ? I dont see any field to add in the report. – teeshu Oct 3 '19 at 22:38
  • Apologies, perhaps I was not clear. You would not group by Account name, but by the Lookup field on Account that looks up to the X Object. – DC-Fencer Oct 4 '19 at 15:40
  • Thanks......... – teeshu Oct 7 '19 at 18:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.