Find your content:

Search form

You are here

Hiding "New Note" button


I am showing Notes & Attachment section. I want to hide "New Note" button on the related list. I don't find any way for doing that. How can I do that? Any thoughts?

Attribution to: doga

Possible Suggestion/Solution #1

As far as I know, this can't be done, however, there is an Idea for that:

IdeaExchange Salesforce

Attribution to: pjcarly

Possible Suggestion/Solution #2

There are no explicit profile permissions to control Notes and Attachments just yet. So if you have, I believe Edit access to the Record, you would probably be able to add a Note or an Attachment.

A few ways to work around it : a)A trigger on attachment preventing insertion of attachment by checking the User Profile and using the control conditions that are relevant to you.

b)Get rid of the standard Attachment related list and use a VF Section (You lose the hover link at the top though)

Attribution to: techtrekker

Possible Suggestion/Solution #3

There is a way, but it is a discouraged practice as it a dependency on the salesforce html, which may change without notice. Using a homepage/sidebar component you could run javascript to locate and hide the button.

If you use it, please only do it as an improvement of the gui/interface workflow, I'd avoid making any important functionality depend on this kind of modifying of the SF gui.

for instance (removing the name label & input ):

if (document.location.href.toString().indexOf("/a4C") != -1) { /*Hide object name input controls*/
        $('input#Name').parent('div').parent('td').parent('tr').hide(); /*hide the usertype selector, only standard users can be employees*/
        $('select#CF00NM0000000adqZ_mlktp').hide(); /*hide the name output on employee detail page*/

Attribution to: Samuel De Rycke

Possible Suggestion/Solution #4

You can use

<apex:relatedList list="CombinedAttachments" subject"--->
<apex:facet name="header"><center><b>Notes & Attachments</b></center></apex:facet>

This will hide the buttons.

Attribution to: user4862

Possible Suggestion/Solution #5

I managed to do this via a Visualforce page and the apex:relatedList component. It allows you to override the header facet.

<apex:page standardController="Test__c">
   <apex:detail />
   <apex:relatedList list="NotesAndAttachments">
      <apex:facet name="header"><table><tr><td class="pbTitle"><h3>Notes and Attachments</h3></td></tr></table></apex:facet>

I then changed the Action override for the View action to use this page when the user views the record. The result was this...

enter image description here

Note this approach does have its downsides, it only partially obeys Layouts via apex:detail, other related lists will need to be added to the page. Though I am sure possible, I didn't go as far as putting the chatter components on the page, not sure if you need that or not.

P.S. I also tried this as VF page (without the tag) embedded into the native layout. Which worked up until the point I clicked Edit the note, as its in an IFRAME it opened in the frame. Shame!

Attribution to: Andrew Fawcett

Possible Suggestion/Solution #6

Thanks guys your suggestions were really helpful. I think we can use below two approaches for hiding new note button if you override your view action with VF page for an object.

<script type="text/javascript">
$j = jQuery.noConflict();

    // hide new note button



input[name=newNote] {
    display: none;

Attribution to: doga
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content