Update entity record in dynamics365 V9 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/update-entity-record-in-dynamics365-v9/ Microsoft Dynamics CRM . Microsoft Power Platform Fri, 24 Apr 2020 14:32:22 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.4 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 Update entity record in dynamics365 V9 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/update-entity-record-in-dynamics365-v9/ 32 32 176351444 Update and delete entities using the Web API Dynamics 365 V9 http://microsoftdynamics.in/2018/01/15/update-and-delete-entities-using-the-web-api-dynamics-365-v9/ Mon, 15 Jan 2018 12:17:00 +0000 Follow link to “Retrieve multiple entity record using Web API ” above step is required to understand the how to connect with Dynamics 365 using Web API. for update we can use SendAsync ———————————————————————————- JObject content= new JObject();                     content.Add(“statuscode”, “100000000”);          ...

The post Update and delete entities using the Web API Dynamics 365 V9 appeared first on Microsoft Dynamics 365 Blog.

]]>
Follow link to “Retrieve multiple entity record using Web API ” above step is required to understand the how to connect with Dynamics 365 using Web API.

for update we can use SendAsync

———————————————————————————-

JObject content= new JObject();
                    content.Add(“statuscode”, “100000000”);
                    content.Add(“statecode”, “0”);

                    content.Add(“new_name”,“name”);

 HttpRequestMessage updateRequest2 = new HttpRequestMessage(new HttpMethod(“PATCH”),  “[Organization URL]api/data/v9.0/new_test(00000000-0000-0000-0000-000000000001)?$select=new_testid,statuscode,statecode,sab_name”  );
                        updateRequest2.Content = new StringContent(Content.ToString(),Encoding.UTF8, “application/json”);
                        HttpResponseMessage updateResponse1 = httpClient.SendAsync(updateRequest2).Result;
                        if (updateResponse1.IsSuccessStatusCode)
                        {
                            //Get the response content  and parse it.
                           JObject body = new JObject();
                            body.Add(“success”, “true”);
                            return body;
                        }
                        else
                        {
                            throw new Exception(“error”);

                        }

————————————————————————————–

Hope this helped. thanks

SOURCE : mscrm.com

The post Update and delete entities using the Web API Dynamics 365 V9 appeared first on Microsoft Dynamics 365 Blog.

]]>
2747