Wednesday, August 22, 2012

JavaScript to hide left navigation from form in CRM 2011

Question: How to Hide Left Navigation?
Answer: Here in CRM 2011 two options are available to hide left navigation Item pane

Option 1:

  • Open CRM form customization screen
  • Click on “Form Properties” button in  ”Form” tab
  • Go to “Display” tab and uncheck “Show navigation items” (Refer screen below)
  • Save & Publish

After this setting “Open” the form and you will get form without “Navigation” section 

Option 2:

Left navigation item pane divided in multiple categories, all are listed here

1 hide the left navigation pane

document.getElementById(“crmNavBar”).parentElement.style.display = “none”;

after hiding the crmform’s content panel moves to left
to set it back to full width set the colspan
document.getElementById(“tdAreas”).parentElement.parentElement.parentElement.parentElement.colSpan = 2;

hide the related section and the table below it.


document.getElementById(“crmFormNavSubareas”).parentElement.style.display = “none”;
document.getElementById(“crmFormNavSubareas”).parentElement.parentElement.previousSibling.style.display = “none”;


hide the section Item


Xrm.Page.ui.navigation.items.get(“navActivities”).setVisible(false);
Xrm.Page.ui.navigation.items.get(“navActivityHistory”).setVisible(false);

1 comment:

Anonymous said...

This seems to have stopped working for me since upgrading to the latest Rollup (RU13-I think.)

Split the String values with a special character in MS Flow to convert this into Array

 Many times we have a requirement to prepare the Mailing address for some of the documents, suppose there are Address Line1, Address Line2, ...