When working with data via the Dynamics Web API, at some point you are going to want to update your data.
To accomplish this you will need to construct your entity in the same way you did for the insert only now you will use the Patch verb in submitting data to Dynamics.
My original entity code (the data I am updating) will look something like this.
JObject recordToUpdate = new JObject();
string entityFormat = “contacts(” + ContactId.AsQueryId() + “)”;
recordToUpdate[“my_customfield”] = “Some Data”;
Notes:
- You must use the plural of the entity that you are submitting to the service (in this case contacts).
- The Guid that you submit, cannot have the curly braces on either side. For me, I created an Extension method that clears this out relatively easily. This is the record we