Hello,
I want to call a global action by javascript using web api, How can I do it without using any record Id
Below is my code:
var query = "emails(" + parent.Xrm.Page.data.entity.getId().replace('{', '').replace('}', '') + ")/Microsoft.Dynamics.CRM.myCustomActionName"; var req = new XMLHttpRequest(); req.open("POST", parent.Xrm.Page.context.getClientUrl() + "/api/data/v8.0/" + query, true); req.setRequestHeader("Accept", "application/json"); req.setRequestHeader("Content-Type", "application/json; charset=utf-8"); req.setRequestHeader("OData-MaxVersion", "4.0"); req.setRequestHeader("OData-Version", "4.0"); req.onreadystatechange = function () { .........
*This post is locked for comments