Hi all,
How do i compare the values of logged in user security role GUID's with static GUID (where user is having multiple security roles)?
I am using the following code but it does not work as expected.
function Current_loggedin(){
var roles= new Array();
var roles()=Xrm.Page.context.getUserRoles().toString().split(",");
var svalue.toString()="7bEF742D30-019F-E611-8106-C4346BDCFDE1";
for(var i=0; i<roles.length; i++){
if(roles[i] == svalue){
alert(true);
}
else{
alert(false);
}
}
}
Any suggestions