Sample code to call Action using Web API in CRM – Nishant Rana’s Weblog

Just sharing a sample code to call an Action through Web API.

Suppose below is our Action with one input parameter.

JavaScript code :-



function CallAction() {

// get the id of the record and remove the curly bracket part
// id will be used in Web API url
var Id = Xrm.Page.data.entity.getId().replace('{', '').replace('}', '');

var serverURL = Xrm.Page.context.getClientUrl();

// pass the id as inpurt parameter
var data = {

"recordid": Id
};

var req = new...

Full Article

Sample code to call Action using Web API in CRM – Nishant Rana’s Weblog

Blog Syndicated with Nishant Rana’s Permission

More About This Author

Nishant Rana

Author: Nishant Rana

Share This Post On