+ Start a Discussion

How do I remove a button from a related list on a VF page

I'm adding a related list to custom VF page, but I want to remove the "New xyz" button from the list. I removed the button from the list on the standard page layout, but that had no impact.

I believe that should do the trick, but I'm a VF newb.  You can do pageBlockTable like this:


<apex:pageBlock title="Schedule"> <apex:pageBlockTable value="{!OpportunityLineItem.OpportunityLineItemSchedules}" var="sch"> <apex:column value="{!sch.ScheduleDate}"/> <apex:column value="{!sch.Revenue}"/> <apex:column value="{!sch.Description}"/> </apex:pageBlockTable> </apex:pageBlock>




I think xnerd is probably right.  The easiest way would be to simulate the related list with a pageblocktable instead of the "relatedlist" component. 
Lavanya TangatiLavanya Tangati
You can use <apex:facet>

<apex:relatedList list="OpportunityContactRoles">
  <apex:facet name="header">Contact Roles</apex:facet>

this should override the button