In Dynamic 365 v9.0 we can use “Xrm.Utility.invokeProcessAction” to execute Global Action. When we need to create an Action to be executed on multiple entities, we can use Global Action in Dynamics 365.
Here in the below example, we are cloning Account record by executing Global Action in Dynamic 365 v9.0.
Create Global Action:
1. Go to Setting -> Processes -> Click New and then select Category as “Action” and Entity as “None(Global)” as you can see in the below screenshot.
2. We have selected Entity: None(Global) for executing the global action. So by doing this, we can reuse the same Action globally to any entity where ever needed.
3. It accepts an input and Output parameter. You can specify parameters of any of the following data types.
In our case we are passing AccountId as an input parameter and ClonedId as an output parameter, so when global Action will execute it will take AccountId as an input parameter (Account record Guid as a string Parameter) and in result will return ClonedId as an output parameter(Cloned Account Guid as a string parameter).
Execute Global Action using Xrm.Utility.invokeProcessAction:
Here as you can see in the below screenshot, in console we got Cloned Account record Id as output paramater
By using the above simple steps one can use global Action on multiple entities in Dynamics 365 CRM.
Read More about invokeProcessAction (Client API reference).