web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Suggested Answer

Execute Action using Web API, C#, Dynamics 365

(0) ShareShare
ReportReport
Posted on by 6

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

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    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

  • Ravitheja J Profile Picture
    6 on at

    Hi,

    Thanks for the reply.

    I am looking for C# code snippet, not JS.

  • Ashish Vishwakarma Profile Picture
    80 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans