Hi all,
I have developed a code to compare the logged in user name and the owner of the record username (i.e. onwerid). For some reason it is not comparing the two values.
function finalq(){
debugger;
var luser = Xrm.Page.context.getUserName();
var accmg = Xrm.Page.getAttribute("ownerid").getValue();
var accmgtext = accmg[0].name;
accmgtext = accmgtext.toString();
alert(accmgtext);
if(luser == "accmgtext"){
Xrm.Page.getControl("new_finalcustomerquote").setDisabled(true);
}
else{
Xrm.Page.getControl("new_finalcustomerquote").setDisabled(false);
}
}
*This post is locked for comments