Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to filter baseenum in OData ?

(2) ShareShare
ReportReport
Posted on by 312
Hi guys,
 
When filtering Odata, as per my understanding, we need to use the keyword /eq/ for equal or /ne/ or not equal. 
How to filter field with BaseEnum Type ? for example I want to filter warehouses with Type not Transit
 
In Postman, I hit this error:
 /message/: /An error has occurred./,
 /message/: /A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.DataEntities.InventLocationType' and 'Edm.Int32' for operator kind 'NotEqual'./,
 
Thanks
 
  • Layan Jwei Profile Picture
    Layan Jwei 7,613 Super User 2025 Season 1 on at
    How to filter baseenum in OData ?
    Hi Teevo,
     
    Are you still facing the same issue when verifying answers? Because the community mentioned that the issue is resolved now. So please confirm if it's still not solved so that we raise it
  • Teevo Profile Picture
    Teevo 312 on at
    How to filter baseenum in OData ?
    Hi Martin,
     
    No problem. Kindly help to mark all answered as resolution ?
    Many Thanks.
  • Martin Dráb Profile Picture
    Martin Dráb 230,817 Most Valuable Professional on at
    How to filter baseenum in OData ?
    Yes, sorry, it was my mistake when copying the enum type name.
  • Teevo Profile Picture
    Teevo 312 on at
    How to filter baseenum in OData ?
    Hi all,
     
    Sorry. I overlooked at the "dot" after the BaseEnum name, which supposed to not needed.
     
    Issue solved.
     
    I hope I can mark as resolved. If not, kindly help to mark all answers.
     
    Thanks.
  • Teevo Profile Picture
    Teevo 312 on at
    How to filter baseenum in OData ?
    Hi Martin,
     
    Is that also valid inside Postman ?
     
    I had this error though:
  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,965 Super User 2025 Season 1 on at
    How to filter baseenum in OData ?
    Hi Teevo,

    Martin is correct. You can read more about how to use OData with Dynamics 365 F&O entities on Microsoft Learn: Open Data Protocol (OData) - Finance & Operations | Dynamics 365 | Microsoft Learn 
  • Verified answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 13,249 Super User 2025 Season 1 on at
    How to filter baseenum in OData ?
    Hi @Teevo,
     
    Please refer to this :
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,817 Most Valuable Professional on at
    How to filter baseenum in OData ?
    It should be something like WarehouseType ne Microsoft.Dynamics.DataEntities.InventLocationType'Transit'.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans