I had a requirement to control visibility of navigation link on some condition. I added onload function and from that function called following function.
function SetDocumentationVisbitlity(navigationlabel, visibility) {
var items = Xrm.Page.ui.navigation.items.get();
for (var i in items) {
var item = items[i];
if (item.getLabel() == navigationLabel) {
item.setVisible(visibility);
}
}
}
No comments:
Post a Comment