Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Javascript

$
0
0

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


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>