Hi everyone,
Thank you for helping in advance,
I got an error when debugging my JavaScript code
"Failed to load resource: the server responded with a status of 404 (Not Found)"
on the line: "xmlHttpRequest.send();"
full code:
executeRequest: function (request) {
var xmlHttpRequest = new XMLHttpRequest();
var response = null;
xmlHttpRequest.open("GET", OrgDataService.getRESTUrl() + request, false);
xmlHttpRequest.setRequestHeader("Accept", "application/json");
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
xmlHttpRequest.send();
return xmlHttpRequest.responseText;
},
getRESTUrl: function () {
var serverUrl = Xrm.Page.context.getClientUrl();
return serverUrl.substring(serverUrl.lastIndexOf("/")) + "/xrmservices/2011/organizationdata.svc";
}
Thank you again!