function hideGunTransactionEntries()
{
var isLockedfield=Xrm.Page.data.entity.attributes.get("jmh_lockedbypolice");
if(isLockedfield != null)
{
var isLockedfieldValue=isLockedfield.getValue();
if(isLockedfieldValue == 1)
{
var objNavItem = Xrm.Page.ui.navigation.items.get("nav_jmh_jmh_gun_jmh_guntransactionentry_gun");
objNavItem.setVisible(false);
}
else
{
var objNavItem = Xrm.Page.ui.navigation.items.get("nav_jmh_jmh_gun_jmh_guntransactionentry_gun");
objNavItem.setVisible(true);
}
}
}
{
var isLockedfield=Xrm.Page.data.entity.attributes.get("jmh_lockedbypolice");
if(isLockedfield != null)
{
var isLockedfieldValue=isLockedfield.getValue();
if(isLockedfieldValue == 1)
{
var objNavItem = Xrm.Page.ui.navigation.items.get("nav_jmh_jmh_gun_jmh_guntransactionentry_gun");
objNavItem.setVisible(false);
}
else
{
var objNavItem = Xrm.Page.ui.navigation.items.get("nav_jmh_jmh_gun_jmh_guntransactionentry_gun");
objNavItem.setVisible(true);
}
}
}
No comments:
Post a Comment