{"id":2304,"date":"2010-08-16T16:34:32","date_gmt":"2010-08-16T11:34:32","guid":{"rendered":"http:\/\/www.chiragmehta.info\/chirag\/?p=2304"},"modified":"2012-12-21T21:49:43","modified_gmt":"2012-12-21T16:49:43","slug":"salesforce-hide-standard-buttons-display-working-version","status":"publish","type":"post","link":"https:\/\/www.chiragmehta.info\/chirag\/2010\/08\/16\/salesforce-hide-standard-buttons-display-working-version\/","title":{"rendered":"Salesforce &#8211; Hide standard buttons display (Working version)"},"content":{"rendered":"<p>There are many a times where we want to remove few standard buttons  from page layout, but there is no such option to remove such restricted  buttons. Few such buttons are &#8230;<\/p>\n<li>&#8220;New Note&#8221; or &#8220;Attach File&#8221; button on Google Docs, Notes, &amp;  Attachments  Related list<\/li>\n<li>&#8220;Save &amp; Send Invitation&#8221; button on New Event page<\/li>\n<p>Following is a solution which will hide &#8220;Save &amp; Send Invitation&#8221;  button on New Event page<\/p>\n<p><strong>STEP1: JAVASCRIPT Code. Create a JS file with below code<br \/>\n<\/strong><\/p>\n<blockquote><p>\nfunction hideBtns()<br \/>\n{<br \/>\nif(document.getElementsByName(&#8220;sendEmail&#8221;)[0]!=null)<br \/>\ndocument.getElementsByName(&#8220;sendEmail&#8221;)[0].style.display = &#8216;none&#8217;;<br \/>\nif(document.getElementsByName(&#8220;sendEmail&#8221;)[1]!=null)<br \/>\ndocument.getElementsByName(&#8220;sendEmail&#8221;)[1].style.display = &#8216;none&#8217;;<br \/>\n}<br \/>\nif (window.addEventListener) {<br \/>\nwindow.addEventListener(&#8220;load&#8221;, hideBtns, false);<br \/>\n}<br \/>\nelse if (window.attachEvent) {<br \/>\nwindow.attachEvent(&#8220;onload&#8221;, hideBtns);<br \/>\n}\n<\/p><\/blockquote>\n<p><strong>STEP2: Upload the JS file as a DOCUMENT<br \/>\n<\/strong><\/p>\n<p><strong>STEP3: Create a Home Page Component of type (HTML Area)<\/strong><\/p>\n<blockquote><p>&lt;script  src=&#8221;\/servlet\/servlet.FileDownload?file=01530000001OcDl&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>Here 01530000001OcDl is ID of document created in STEP2<\/p><\/blockquote>\n<p><strong>STEP4: Add above created Home page component in your home page  layout.<\/strong><\/p>\n<p>That&#8217;s it you are all set, now open New Event and add invitees,  automatically the &#8220;Save &amp; Send Invitation&#8221; button will disappear.<\/p>\n<p>Please note : If you have some functionality which you want to work across all pages or on every form then navigate to Setup  then go to Customize-&gt;User Interface, check &#8220;Show Custom Sidebar  Components on All Pages&#8221; under the Sidebar section.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many a times where we want to remove few standard buttons from page layout, but there is no such option to remove such restricted buttons. Few such buttons are &#8230; &#8220;New Note&#8221; or &#8220;Attach File&#8221; button on Google Docs, Notes, &amp; Attachments Related list &#8220;Save &amp; Send Invitation&#8221; button on New Event page [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[27,169],"class_list":["post-2304","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-javascript","tag-salesforce","post-preview"],"_links":{"self":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/comments?post=2304"}],"version-history":[{"count":3,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2304\/revisions"}],"predecessor-version":[{"id":2306,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2304\/revisions\/2306"}],"wp:attachment":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/media?parent=2304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/categories?post=2304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/tags?post=2304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}