[SalesForce] Beginner – Create attach Contact Related List to Custom Object

I want to capture the "Contacts" related field that exists in my "Accounts" tab, and use something similar in my "Projects" tab. The photo below shows the contacts field in the accounts tab.


accounts


In the "Project" tab, a related list called "Contacts" does not exist when I try to customize the page. The picture below shows that I do not have the option to use the Contacts related list on this page.


list


I need to add the Contacts field to each individual project in my "Project" tab, but it does not seem possible. How can I achieve this?

Best Answer

A Section is a Horizontal rule that separates data on a page layout. In your first screenshot "Address Information" and "System Information" are examples of a section.

In this regard, it is not possible to add a related list to a section on a page layout.

In your second screenshot, it shows that Project is a custom object. This is very different from a section and this distinction changes the answer drastically.

Before I tell you how to add the related list, I want to let you know that your second screenshot will only add the related list to your own page layout and will not update the page layout of your end users. If you need to update your page layout for end users: Voila! How to update page layouts.

Alright, now, to add the contact related list to the Project Custom object:

Create a field on Contact

The field type should be Lookup:

Select Lookup

Select Project in the Related To field:

Populate Related To

Note: I'm using Vehicle classification because it's a fake object I use to play around with.

Fill out the field name:

Enter Field Name

Note: this name cannot contain spaces and is used when the field is referenced in code. You can auto-populate the name but clicking into the Field Label field and pressing the tab key. Leave everything else on this page alone and click next.

Since you're a beginner, just keep smashing next until you see a save button. Click save.

And you're done. One of the pages you smash next on will automatically add the related list for you. If you're field already exists or you want to be more picky about which page layouts it gets added to, view the link I provided (there are other references available on the bottom of the page for more information about page layouts).