+ Start a Discussion
Eric BlaxtonEric Blaxton 

VisualForce Showing Related list...how to hide custom buttons

I am so close...yet so far away.  I have a related list that I want to be editable with the action column and buttons working etc.

I created a VF page that shows this same related list on another object.  On this view, I want to hide the action columns, successful, and I want to hide the new buttons, not successful.  IS there a way to hide the command buttons easily?

Here is my code:

<apex:page standardController="Account" >
<apex:relatedList list="Registrations__r" pageSize="10"  />
<style type="text/css">
.actionColumn {display:none; visibility:hidden}
.label {display:none; visibility:hidden}

</style>
</apex:page>
Best Answer chosen by Eric Blaxton
Eric BlaxtonEric Blaxton
Hi and thanks for your reply. The "New" button was not the issue, but rather the New custom buttons. I found a way to alleviate this problem. What I did was to create a second lookup field on the Account object. I then created a second related list, customized it, and then I referenced it on the Visual Force page on another object, Opportunities. I hid the 2nd related list via the "Customize Page" link on the Account page. Eric

All Answers

Satish_SFDCSatish_SFDC
On the related list settings there should be an option to 'show' or 'hide' the New button.

Also see if this link helps you.
https://developer.salesforce.com/forums/ForumsMain?id=906F000000098pvIAA


Regards,
Satish Kumar
Eric BlaxtonEric Blaxton
Hi and thanks for your reply. The "New" button was not the issue, but rather the New custom buttons. I found a way to alleviate this problem. What I did was to create a second lookup field on the Account object. I then created a second related list, customized it, and then I referenced it on the Visual Force page on another object, Opportunities. I hid the 2nd related list via the "Customize Page" link on the Account page. Eric
This was selected as the best answer