Call unbound actions in Dynamics 365 Customer Engagement v9

Blog Thumbnail

Introduction: 
In this blog lets look at how to call an unbound action using Xrm.WebApi which provides properties and methods to use Web API to create and manage records and execute Web API actions and functions in Customer Engagement

Implementation
The syntax for execute method is as follows:



Step 1: Create an unbound action. Here we created an action “new_ActionTest” and activated it.
Action Steps


In the action steps we have written a step to create a new contact with the name “Jessy David”. Here in our action we an Integer parameter. Any steps can be added as required.

Step 2: Below shown code is function used to call the unbound action.
Here “boundParameter” parameter is an optional String parameter, we have specified it as null as our action is not bound to any entity. “operationName” is an optional String parameter which is the name of the action.“operationType” is an optional Number parameter which indicates the type of operation we are executing is an Action hence we have specified 0. We can specific 1 for Functions and 2 for CRUD operations.
When we run this, the action is called and a new contact is created according to the steps mentioned.
Hope this Helped!

Comments

Popular posts from this blog

Run Workflow directly from a button in Dynamics 365 Customer Engagement V9.0

Create and Associate Records in a single operation using Xrm.WebAPI in D365 Customer Engagement

Use Audit Logs in Dynamics 365 : Actionable Audit