Home > Blog > How to add more than 10 columns in a related list on standard page layout?

How to add more than 10 columns in a related list on standard page layout?

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 cannot 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 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: Step 3: After selecting the wrench, the screen below will be displayed: If you attempt to add more than 10 fields you will receive the error message shown below: 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: 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. Step 6: Save your Page Layout. Below is an example of a Related List with more than 10 fields exposed! Please note, if you remove fields and expose 10 or less again, the steps above will need to be repeated.
Enquire Now

lets get over a cup of coffee and discuss!