Xrm.Page.ui.navigation.items 获取左边导航栏的集合
getId 获取导航项的名称
var navItemIds = [];
Xrm.Page.ui.navigation.items.forEach(
function (item, index)
{
navItemIds.push(item.getId())
}
);
getLabel 获取导航项的显示文本
var navAddressesLabel = Xrm.Page.ui.navigation.items.get("navAddresses").getLabel();
setLabel 设置导航项的显示文本
Xrm.Page.ui.navigation.items.get("navAddresses").setLabel("Other Addresses");
setVisible 显示或者隐藏某个导航项
Xrm.Page.ui.navigation.items.get("navAddresses").setVisible(false);
getVisible 获取某个导航项是否可见
var moreAddressesVisible = Xrm.Page.ui.navigation.items.get("navAddresses").getVisible()
setFocus 将焦点放到某个导航项上
Xrm.Page.ui.navigation.items.get("navAddresses").setFocus();