The Silverline BlogExpert Salesforce tips & tricks, articles and musings. Sprinkled with fun.

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

Help & Training

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.

7
Leave a Reply

avatar
7 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
7 Comment authors
SamiJim CdencypriyaDaveKelvin Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Paul Wilson
Guest
Paul Wilson

This is an awesome hack Chris!
Thanks!
PW

Chris Marsh
Guest

I have been providing this solution to dozens of salesforce developers who emailed me over the past few years. Chances are it was me ;).

Kelvin
Guest
Kelvin

Hi Chris,

Can you extend the limit of 4 columns on a Lightning related list?

Dave
Guest
Dave

doesnt work

get error

VM674:1 Uncaught ReferenceError: VFEditor is not defined(…)

dencypriya
Guest

Hiii…
i have read this blog…Thanks for sharing the salesforce informations…
Salesforce Admin Training | Salesforce Admin Online Training

Jim C
Guest

Still works! Thank you!

Sami
Guest
Sami

Still works as of Spring ’17 release. Thanks!

Need a custom solution? We can help. Let's Chat