Hi,
I have a strange behaviour doing a web api call to get lookup value of an entity.
It works with a system admin, but doesn't return lookup value for a user with a security role with Organization access to the entities it is querying.
As you see I've built 2 calls, to test if second call work, despite first one works for the sys admin user,
I've make sure user has Organization permissions to Resource and bank holiday jurisdiction, but it always return null.
Is there anything else related to permission I should check?
Xrm.WebApi.retrieveMultipleRecords("bookableresource", "?$select=name,_new_bankholidayjurisdiction_value&$expand=new_BankHolidayJurisdiction($select=new_name)&$filter=_userid_value eq " + userID).then(
function success(resultQuery)
{
if(resultQuery.entities.length == 0)
{
return;
}
else
{
var resultResource = resultQuery.entities[0].bookableresourceid;
Xrm.WebApi.retrieveRecord("bookableresource", resultResource, "?$select=_new_bankholidayjurisdiction_value").then(
function success(resultFP) {
var payee = resultFP._new_bankholidayjurisdiction_value
},
function (error) {
console.log(error.message);
// handle error conditions
}
);


system Admin call
