0

I have a Visualforce page which displays a related list of child objects. The list, however, displays the "New" button, which I need to remove. Is this possible, or am I stuck with building a custom related-list-like table?

For example, this code

<apex:page standardController="Account">
    <apex:relatedList list="Contacts"/>
</apex:page>

will display the related list which will also display the "New Contact" button. My objects are custom, but the problem is equivalent. Can those buttons be affected either from Visualforce code or from an extension controller?

Let me add that I can't simply remove the New button from the layout, because I need the related list in different custom pages, sometimes with and sometimes without the New button.

marked as duplicate by Samuel De Rycke, Peter Knolle, eyescream, Kelly J Andrews, Bartley Jan 30 '14 at 15:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.