Execute Action using Web API, C#, Dynamics 365 RRS feed

  • Question

  • 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);

    Thanks and Regards.

    Monday, August 21, 2017 4:10 AM

All replies

  • Hi, 

    Is it possible that the service root url of the web API instance contains an error or the credentials aren't correct. Can you try with another request such as retrieve all account ? 



    Monday, September 4, 2017 11:49 AM