+ Start a Discussion
Arif Iqbal 5Arif Iqbal 5 

Hiding 'Add Note' and 'Add Attachment' buttons on Notes & Attachments

Hi Team,

I am not a developer so may need some hand holding. I have a requirement to Hide the Notes and Attachement buttons on Objects for Contacts, Accounts and Opps. The buttons should only be visible on the Leads object. From what I have read this is not configurable and requires Apex Code.

I have created an Apex page with the following code but obviously did not work. What stesp do I take and where do I put the code?

Here is the code i used (I found this on a forum )
<apex:page standardController="Account"> <apex:relatedList list="NotesAndAttachments"> <apex:facet name="header">&nbsp;</apex:facet> <!--This line of code removing the attachment header--> </apex:relatedList> </apex:page>
Thanks, A
Abhilash Mishra 13Abhilash Mishra 13
Well code seems fine, you have to user id value to view it correctly. I hope you are doing it.
something like this URL.
<salesforce instance url> /apex/<visualforcepagename>?id=<accountid>