I need to display this related list near the top of the page, so I insert it as a visualforce page.

However, there are some fields on the related list that I don´t want to display.

So that´s easy: I remove them from the original related list through the page layout editor, and the changes are reflected in the visualforce version.

The problem is that if I then remove the original related list from the page layout, the changes to the visualforce version are lost.

So it seems that to display a customized version of the list, near the top of the page, I need to have the original version present, near the bottom of the page.

My question is, can I make the original version invisible, whilst still using it to influence the visualforce version? Or is there a way to customize the visualforce version directly? I only want to display the visualforce version, but I also need this visualforce version to display the necessary fields and buttons.

At the moment, this is my code for my visualforce version of the related list:

<apex:page standardController="Contact">
<apex:relatedList list="CampaignMembers" />

1 Answer 1


apex:relatedList is replica of your standard page layout configuration. It works in the same way as it work on your page layout.

There is an idea to include column attribute in apex:relatedList.

<apex:relatedList list="Contacts" columns="Name,Email"/>

I would suggest you to use pageBlocktable to display the related list with the help of controller. Here is very good post on this topic.

You must log in to answer this question.