简体   繁体   中英

Dynamics 365 Web API: GetAsync record without OData-EntityId

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!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM