Skip To Content
Back to Blog

Salesforce Hack: How-to Add More Fields to Related Lists

By 09.28.15
Reading time: 3 minutes

Let me start by saying that this hack is not mine. Somewhere along the way I was provided with this solution when a client asked to have more than 10 fields in a Related List. Unfortunately I can not remember who exactly provided this solution so I cannot give credit where credit is due however I have kept it in my trusty “hack” folder and use it for very specific use cases. With Lightning now a reality, I thought it would be a good time to show some love for Salesforce “Classic”.

This can be done for any browser, Screenshots & Instructions for Chrome as well as Instructions for Firefox. Internet Explorer Users, why are you still using it? Really….

Step 1

Navigate to the Page Layout that you wish to add more fields to a Related List for. You can access the Page Layout via the Setup menu or the Edit Layout on the object itself.

Step 2

Once you are on the edit screen of the Page Layout, navigate to the Related List that you wish to adjust the number of fields for. Select the wrench icon beside the Related List as shown below:

Addmorefields1

Step 3

After selecting the wrench, the screen below will be displayed:

addmorefields2

If you attempt to add more than 10 fields you will receive the error message shown below:

addmorefields3

Step 4

In Chrome type Control + Shift + J to launch Chrome’s Console on PC (For Mac Users, type Control + Option + J). If you are using Firefox Control + Shift + K on PC (For Mac Users, type Command + Option + K) The following screen should appear:

addmorefields4

Step 5

Copy and Paste VFEditor.MAX_RELATED_LIST_COLUMNS = x at the console prompt and press Enter. You may replace the letter x with the number of Columns (i.e. = 20) that you want to display. You can go ahead and close the console after you finish. Please note that this is a hack and that Salesforce updates could potentially cause this hack to no longer function. In addition, any fix by Salesforce could cause potential errors within your org for those Related Lists that have more than 10 fields displayed.

addmorefields5

Step 6

Save your Page Layout. Below is an example of a Related List with more than 10 fields exposed!

addmorefields6

Please note, if you remove fields and expose 10 or less again, the steps above will need to be repeated.

To stay up-to-date with more Salesforce hacks like this, subscribe to our blog.

We don't support Internet Explorer

Please use Chrome, Safari, Firefox, or Edge to view this site.