Problem
https://aaaaaa.sandbox.ax.dynamics.com/data/PartyLocationPostalAddressesV2?$top=100&$filter=IsPrimary eq 'Yes'
or
https://aaaaaa.sandbox.ax.dynamics.com/data/PartyLocationPostalAddressesV2?$top=100&$filter=IsPrimary eq True
Then you got the error.
<Message>An error has occurred.</Message> <ExceptionMessage>
A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.DataEntities.NoYes' and 'Edm.Boolean' for operator kind 'Equal'.
</ExceptionMessage> <ExceptionType>Microsoft.OData.Core.ODataException</ExceptionType>
Many thanks to..
Martin DrĂ¡b Filter for enum fields in OData service
Solution
https://aaaaaa.sandbox.ax.dynamics.com/data/PartyLocationPostalAddressesV2?$top=100&$filter=IsPrimary eq Microsoft.Dynamics.DataEntities.NoYes'Yes'
Until the next post!
No comments:
Post a Comment