0
votes

I'm new to the Dynamics 365 Web API and I'm trying some things out. I followed and used the BasicOperations C# application with success.

Now I would like to perform an HTTP GET method to get an account/contact record and then update it with new values.

The problem is that I can't seem to get the record without using the OData-EntityId. Is it even possible to do so? All the examples start with creating an entity and then using the ID to perform update/delete/get methods.

Can someone point me in the right direction?

Thank you!

1

1 Answers

2
votes

You can do that. Basically you want to filter another field other than Primary key field.

For example the below code will retrieve all the records where new_test attribute value is 12.

var response = httpClient.GetAsync("[Organization URI] api/data/v9.0/new_test?$select=new_testid,new_amount,new_caseid,new_email&$filter=new_test eq '12'",

Read more