I want to call bounded action by WebApi in Power Pages so I`ve tried to use code below but for some reason it shows me an error message. Could you please explain why I keep getting this error message?
shell.getTokenDeferred().done(function (s) {
var inputJson = {};
inputJson.InputCategoryId = "{{request.params.id}}";
var inputstring = JSON.stringify(inputJson);
var url = "https://<portalurl>/_api/contacts({{user.id}})/Microsoft.Dynamics.CRM.tttt_GetResourcesByContact";
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", url
, true);
xmlHttp.setRequestHeader('Content-Type', 'application/json');
xmlHttp.setRequestHeader('__RequestVerificationToken', s);
xmlHttp.onreadystatechange = function () {
if (this.readyState === 4) {
if (this.status === 200) {
}
else {
}
}
};
Error message:
{
"error": {
"code": "90040100",
"message": "Attribute {0} cannot be found for table {1}.",
"innererror": {
"code": "90040100",
"message": "Attribute {0} cannot be found for table {1}.",
"type": "InvalidAttribute"
}
}
}
Arguments:
Site settings: