Hiding nav items and groups

At some point you may need to show or hide individual nav items or the complete group.

Hide Item:

image

var navItem = Xrm.Page.ui.navigation.items.get(“navActivities”);
navItem .setVisible(false);

Show Item:

var navItem = Xrm.Page.ui.navigation.items.get(“navActivities”);
navItem .setVisible(true);

Hide Nav Group:

image

Located the tag which displays the groupname , in this case “Common”. Then hide the parent (as the parent doesn’t have an ID to find).

var navGroup = document.getElementById(“_NA_Info”);

navGroup.parentNode.style.display=”none”;

To find all the necessary IDs, use the IE debugger.  This can be started by F12.

This entry was posted in CRM 2011 and tagged , . Bookmark the permalink.

Comments are closed.