function GetloggedUser () {
var roles = Xrm.Utility.getGlobalContext().userSettings.roles;
if (roles === null) return false;
var hasRole = false;
roles.forEach(function (item) {
if (item.name.toLowerCase() === "manager" || item.name.toLowerCase() === " System administrator") {
hasRole = true;
}
});
return hasRole;
}
No comments:
Post a Comment