Hiding or disabling elements in Microsoft Dynamics CRM 3.0


Aim : To disable the close opportunity menu item from the Actions Menu for Opportunity form.

Put the following code in the Form_Load script of the Opportunity form

document.getElementById(‘_MIcomplete’).Style=”display:none” ;


Put the id of the menu item there
To get the id name for any particular menu item

  • step 1- open the opportunity form in crm.

  • step 2- press ctrl+N to open the same form in a new window.

  • step 3- right click go to view source and find the id of the required element.

Same thing we can do for buttons added through isv.config as well as other elements

ISV_New_1_199_Billing.style.display = “none” ;

Bye

Author: Nishant Rana

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

2 thoughts on “Hiding or disabling elements in Microsoft Dynamics CRM 3.0”

  1. If this is JavaScript, then you will want to modify your code to be compliant and work in all browsers.

    //original
    document.getElementById(‘_MIcomplete’).Style=’display:none’;

    //better
    document.getElementById(‘_MIcomplete’).style.display=’none’;

    thanks

    1.) The style property is “style” (all lower case)
    2.) You are better to set the specific style property, rather than apply an overwrite to the entire style property.

    Like

Please 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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.