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

3 comments:

Anonymous said...

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

lee woo said...

I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


edupdf.org

Silvia Jacinto said...

Life is full of many challenges. Challenges that will make you or break you depending on how you handle it. Visit my site for more updates. God Bless to your site.

n8fan.net

www.n8fan.net

Loading...