Hi All,
I am trying to get all the users or teams to with whom the current record is shared. Am trying to achieve this using the Xrm.Webapi.execute method and the unbound function
var Id = Xrm.Page.data.entity.getId().replace('{', '').replace('}', '');
var target = {entityType:"account",id:Id};
var req = {};
req.Target = target;
req.getMetadata = function () {
return {
boundParameter: undefined,
operationType: 1,
operationName: "RetrieveSharedPrincipalsAndAccess",
parameterTypes: {
"Target": {
typeName:"mscrm.crmbaseentity",
structuralProperty: 5
}
}
};
};
Xrm.WebApi.online.execute(req).then(
function (data) {
var e = data;
debugger;
},
function (error) {
debugger;
var errMsg = error.message;
}
);
}
At run time am getting the exception Resource not found for the segment 'RetrieveSharedPrincipalsAndAccess'.
*This post is locked for comments