AlexaCRM / dynamics-webapi-toolkit

Dynamics 365 Web API Toolkit for PHP
MIT License
75 stars 58 forks source link

Advanced OData usage using OData\Client::getHttpClient() #61

Open smartinsight-at opened 3 years ago

smartinsight-at commented 3 years ago

I am trying to identify records that have been deleted in the CRM so I can remove them from our local database.

I think the answer may be in Advanced OData usage using OData\Client::getHttpClient() and accessing access the change tracking feature of Dynamics.

Would anyone have an example code for returning this information from Dynamics using the web-api-toolkit to give me a starting point with calling the odata\client from Alexacrm.

Many Thanks

georged commented 3 years ago

@smartinsight-at if you're looking to use change tracking, you definitely would need to use OData client. As for the OData parameters, well, they are standard OData parameters as documented in OData specs or Web API documentation. The parameters can be passed into getList via options. That includes OData options like $select, $filter, etc as well as Prefer header that would need to include odata.track-changes as documented

At the moment we do not have any samples for advanced OData use but it's well documented elsewhere. This is a good place to start: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/overview