AlexaCRM/dynamics-webapi-toolkit

QueryByAttribute Where Not Equal to Value

tsukasa-sama opened this issue · 2 comments

I am attempting to query incidents but want to get all where the status does not equal a value. Is that possible with AddAttributeValue? Or do I need to do some oData client query for this?

@tsukasa-sama
For now you can use fetchxml to build advanced condition. Fwiw, status is only 1 or 0 for most of the entities so it's easy to revert it to the equal condition and use AddAttributeValue.

You can run your own query using OData::Client, see Advanced usage.

HTH
George

For anyone stumbling through this later, the FetchExpression is how I solved this. A decent starting reference for the FetchXML syntax can be found here: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-fetchxml-construct-query