Hi, I am trying invoke an action from javascript, but it returns error "not found", it is a global action. how should I debug this?
function executeAction(){ debugger; var parameters = {}; parameters.ApplicationRef = "8B446743-C6C4-E711-A81C-005056B5FEFA"; parameters.Amount = "300" parameters.AuthCode = "authcode" var req = new XMLHttpRequest(); req.open("POST", Xrm.Page.context.getClientUrl() + "/api/data/v8.2/recoserv_actiontest", true); req.setRequestHeader("OData-MaxVersion", "4.0"); req.setRequestHeader("OData-Version", "4.0"); req.setRequestHeader("Accept", "application/json"); req.setRequestHeader("Content-Type", "application/json; charset=utf-8"); req.onreadystatechange = function() { if (this.readyState === 4) { req.onreadystatechange = null; if (this.status === 200) { var results = JSON.parse(this.response); } else { Xrm.Utility.alertDialog(this.statusText); } } }; req.send(JSON.stringify(parameters)); }
*This post is locked for comments