We are attempting to return the data that is received from an ajax call to the REST service below. This continues to return nothing at all. Can anyone advise where we've gone wrong with this?
function getUserSPInfo(encodedUserLDAP) {
try {
var thisURL = merchsig_URL + "/_api/web/siteusers(@v)?@v='" + encodedUserLDAP + "'";
// Executing our items via an ajax request
$.ajax({
url: thisURL,
method: "GET",
async: false,
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
return data; // We can debug and see the data object as expected
}
});
} catch (err) {
formError(arguments.callee, err.toString());
}
}Use of above is
var candidateInfo = getUserSPInfo(candidateEncode);
- Thank you. Respectfully, Janette M. Ricker