Filter on NoYes field in Dynamics 365 Flow Connector
8. February 2021 1 Comment
The Dynamics 365 connector in Power Automate provides the basic operations to interact with your Dynamics 365 FO instance. You can create new records via flow (e.g. a new Customer), read, update and delete records (e.g. Sales Order Lines) and retrieve the list of available entities.
The connector uses OData to interact with the entities in Dynamics 365 FO. Therefore, it also supports OData syntax for filter expressions. If you want to filter on a boolean Extended Datatype like NoYes and try to use “Yes” or “1” or true it will not work. Dynamics 365 has its own Datatype that comes from the entity definition Microsoft.Dynamics.DataEntities.NoYes .
For example, if you want to get all One-Time Customers from Dynamics 365 FO, use the Dynamics 365 connector and choose the action “List items in present Table”. Use the Customers entity. To filter on a NoYes field like One-Time Customer you have to use the following syntax:
- IsOneTimeCustomer eq Microsoft.Dynamics.DataEntities.NoYes’No’
- IsOneTimeCustomer eq Microsoft.Dynamics.DataEntities.NoYes’Yes’
I’ve been searching for hours for an explanation why the Boolean filter was not working.
Thank you for this!!!