hello everyone~
i am currently working on a project where i was giving a pretty straight forward requirement.
depending on the user display certain things. i figured i would just write some JS and implement it via a web resource to grab the user and then query their title. if the title of the user equals a then display a, if b display b. my problem is i cant get my code to work. my code is below, can anyone point me in the right direction to fix my error. i believe my error is in the var selectquery line, but i am not sure where
function MakeRequest(query) {
var lookupObject = Xrm.Page.getAttribute("ownerid"); if (lookupObject != null) { var lookUpObjectValue = lookupObject.getValue(); if ((lookUpObjectValue != null)) { var lookupid = lookUpObjectValue[0].id; } } var selectQuery = "/SystemUserSet?&$filter=SystemUserId eq guid'" + lookupid + "'&$select=JobTitle, FullName"; var oDataResult = null; oDataResult = MakeRequest(selectQuery); alert("Name = " + oDataResult[0].FullName + "\n" + "Job Title = " + oDataResult[0].JobTitle);
}
*This post is locked for comments