Wednesday, 13 December 2017

{Know-How} MSCRM JS - show or hide Navigation items using display name or Label

Code Snippet to show or hide a navigation using display name

Function to show or hide Navs
ToggleNavigationItem = function (navName,isVisible) {
    var navs = Xrm.Page.ui.navigation.items.get();
    for (var i in navs) {
        var nav = navs[i];
        if (nav.getLabel() === navName) {

ToggleNavigationItem("Accounts",false); //Hide
ToggleNavigationItem("Accounts",true); //Show

Note: The labels are case sensitive


  1. Amazing Article Written. I am very much glad to read your article.
    I am Following Your From Last 6 Month and really linking the stuff
    you post on your blog on Regular Basis.
    Keep Posting blogs like this….. Thanks alot

    also we provide WhatsApp API Integration Services. if any thing you need then please visit us


Contact Form


Email *

Message *