Tuesday, June 25, 2024

How to Call Action from Plugins in Dataverse or MSCRM

Introduction:


In this Blog we will see how to call action from Plugins in Dataverse or MSCRM


Implementation Steps:

 

1. Create a Action ( find my blog here on how to create Action)

 

2. I have Created an action without any input Parameters

 

rampprakash_0-1719317946713.png

 

 

 

3. Once the Action is Created, Navigate to Settings --> Customization --> Customize the System --> Click Web Resource

 

rampprakash_1-1719317946735.png

 

4. Click New and Create a New Web Resource with Below Code


// Calling the Action
OrganizationRequest req = new OrganizationRequest("new_AccountAction");
req["Target"] = new EntityReference("account", account.Id);
OrganizationResponse response = service.Execute(req);

 

 

Now you can call the above code from any plugin to trigger the action

No comments:

Post a Comment

Basic event handling - Onload, Onchange in MSCRM / Dataverse

  Introduction: Day 3 : Basic event handling - Onload, Onchange in MSCRM / Dataverse Script : function onChange(executionContext) { debu...