Hi:
I am using an onpremise version of CRM 2016.
I have been reading a lot of the tutorials on how to use the Web Api but I have not found any resources that show me how to pass a value on a textbox field from a form (client side) to a C# plugin using Web Api that will update by adding or updating records to the SQL database.
private JObject contact1 = new JObject()
contact1.Add("firstname", "Peter");
contact1.Add("lastname", "Campbell");
HttpRequestMessage createRequest1 = new HttpRequestMessage(HttpMethod.Post, getVersionedWebAPIPath() + "contacts");
createRequest1.Content = new StringContent(contact1.ToString(),Encoding.UTF8, "application/json");
HttpResponseMessage createResponse1 = await httpClient.SendAsync(createRequest1);
From the above you will see that I added "Peter" and "Campbell" to the firstname and lastname fields. How would this be done if firstname and lastname were instead form textbox fields?
Steve
*This post is locked for comments