Hi all,
I have created an Action with an input parameter of type EntityReference - (Contact Entity).
I want to execute this Action using Web Api C#. I have tried the below code - but I was getting 400 Bad Request message. Can someone help me?
JObject actInputParams = new JObject(); actInputParams.Add("recipientParm", new Guid("49A0E5B9-88DF-E311-B8E5-6C3BE5A8B200")); HttpResponseMessage actionResponse = await httpClient.SendAsJsonAsync(HttpMethod.Post, "api/data/v8.2/new_sampleAction", actInputParams);
*This post is locked for comments
Hi,
Thanks for the reply.
I am looking for C# code snippet, not JS.
I think you need to provide the id of the record on which you want to run the action as well. Also, provide fully qualified name of the action. See below links for reference
dynamicscrmcoe.com/how-to-call-an-action-through-the-dynamics-crm-web-api
www.c-sharpcorner.com/.../calling-custom-actions-using-web-api
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156