Hiding Unwanted Navigation In CRM

April 28, 2009 at 11:37 am | Posted in Microsoft Dynamcis CRM, Microsoft Dynamics CRM 4.0 | Leave a comment

Have you ever wanted to hide certain Navigational items that exist CRM forms?  One request we get from time to time is whether or not it is possible to hide the Sub-Contacts menu item, see the image below, from the Contact Form.  In fact, this is relatively easy to do.  All you need is a basic understanding of HTML and JavaScript.


To Get Started, Follow the Instructions Below

Find the ID of the Sub-Contacts Section:

  1. Open A Contact in Microsoft CRM 
  2. With the Contact Open, Press Ctrl + N to open the Contact in a new window
  3. In Internet Explorer Click View -> Source
  4. When the HTML opens in Notepad do a search for  Sub-Contacts, results are in the image below
  5. Just before the highlighted text you will see:  id=”navSubConts”, write down stuff between the “” signs.



Add the Javascript Below to the OnLoad Event of the Contact Form:

  1. Open CRM in the Web Client
  2. Click Settings -> Customization -> Customize Entities
  3. Double-Click the Contact Entity
  4. Click Forms & Views in the left-hand pane
  5. When the list of Forms & Views appear in the right-side, double-click Form
  6. In the right-hand pane, Click Form Properties
  7. Click OnLoad and Click Edit
  8. Paste the following Javascript in the box:
    1. document.getElementById(“navSubConts”).style.display = “none”;
  9. Check the Enable Event checkbox




  1. Click Save & Close twice and then click Publish

Test The Script:

1. Open up a Contact in CRM, if you’re script is working correctly the Sub-Contacts menu option should now be gone, just like the image below:


subcontacthideYou can use this same technique to hide other menu items in not only the Contact form within CRM but in any of the other CRM Forms as well.  Now you have more control over what the users can and can’t do in CRM.  The main key to getting this to work is finding the right ID value in the HTML code.  I’ve noticed that most, if not all of the Navigation is stored with <div></div> tags.  If you can find the correct ID, then the rest is pretty easy.


Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: