function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srilakshmi1.387861669756762E12srilakshmi1.387861669756762E12 

how to hide "new" button on account by using home page components.

Hi,
i wrote a code like this in html area but it is not working ,i think any setting problem .please help me process to execute the below code.
<script>  Sfdc.onReady(function() {    var keyPrefix = 'a7m';    var toRemove = document.getElementsByName('new');    if(document.location.href.indexOf('/' + keyPrefix + '/o') != -1 && toRemove && toRemove.length) {      toRemove[0].style.display = 'none';    }  });</script>
and also emable the Show Custom Sidebar Components on All Pages check box but it is not working
Sonam_SFDCSonam_SFDC
Hi Srilaxmi,

When you say "New" button on accounts are you talking about the Account Tab?

Could you please share the screen shot of the location where you are trying to hide the new button.
srilakshmi1.387861669756762E12srilakshmi1.387861669756762E12
i got solution thank for your reply
srilakshmi1.387861669756762E12srilakshmi1.387861669756762E12
how to  create alert box with colored text by using java script only
srilakshmi1.387861669756762E12srilakshmi1.387861669756762E12
see link once
Sonam_SFDCSonam_SFDC
Please refer to the thread on the below link:https://developer.salesforce.com/forums/ForumsMain?id=906F000000092ujIAA

This as sample code using javascript to bring up an alert message on visualforce page.
srilakshmi1.387861669756762E12srilakshmi1.387861669756762E12
i want by using java script only because i have to place this code on custom creation of a button(onclickjavascript)