Few more JavaScript for CRM

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..


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Few more JavaScript for CRM”

  1. 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’
    }

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s