Execute the Global Action Using Web API in Dynamics CRM

By | October 10, 2016

Introduction:

We have already discussed how to perform entity specific custom action using Web API in one of our earlier blog. But when we want an action to be performed on multiple entities, we need to create a global action.

Create global action:-

  1. Go to Settings → Processes → Click New then select category as “Action” and entity as “None(global)” as shown in below screenshot.Create global action
  2. Create the input argument (i.e InputParameter) and output argument (i.e. OutputParameter) as per below screenshot. Save and Activate the action. Create the input argument

Execute Global Action using Web API:-

Note:

To execute the global action you only need to pass Action Name “new_GlobalAction” shown in the above code

req.open(“POST”, serverURL + “/api/data/v8.0/”+query+”, true);

But to perform entity specific custom action you need to pass the EntityName and Primary id of record as

“account(” + Xrm.Page.data.entity.getId() + “)/Microsoft.Dynamics.CRM.new_EntityAction ”.

Conclusion:

Using the above code, global action can be performed. You can perform this action on multiple entities using Web API.

Wish to Visualize your Dynamics CRM Data on Map? Try Maplytics – Dynamics CRM + Maps.

Leave a Reply