Hi,
While searching for “how to hide new button” from related entity’s grid, these are certain things i found out
Suppose if we want to hide few things from the top bar of the CRM, where we could see New Activity, New Record etc.., we need to write JavaScript in the following page
bar_Top.aspx within _root.
For e.g. if we want to hide ‘New Activity’ button than
<script type="text/javascript">
function window.onload() {
document.getElementById(‘mnu_new_activity’).style.display = ‘none’;
}
</script>
From entity’s grid, if we want to hide say assign button than we need to write JavaScript on the following page
HomePage.aspx
<script language="JavaScript">
function window.onload() {
document.getElementById(‘_MBdoActioncrmGrid4assign’).style.display = ‘none’;
}
</script>
And for entity’s form it would
edit.aspx page for that entity.
for lead it would be
SFA\leads\edit.aspx
for invoice it would be
\SFA\invoice\edit.aspx etc..
However this way of using JavaScript is unsupported.
And lastly for hiding add existing button or new button from related entity’s grid, check this site
http://blog.davehawes.com/post/2008/04/23/MSCRM-4-Remove-Add-Existing-xxxxx-button.aspx
Bye..
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

Thanks for this post Nishant, I was needing help hiding some activity buttons, and thanks for linking to my blog as well! 🙂
LikeLike
Hello Nishant…
I have put the following code in bar_Top.aspx under \CRMWeb\_root. I want to hide some link from activities grid drop down…
I used following code but nothing is happening…. can you please guide me?
function window.onload() {
document.getElementById(‘btn_new_serviceappointment’).style.display = ‘none’;
document.getElementById(‘btn_new_campaignresponse’).style.display = ‘none’
}
LikeLike