web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Incomplete response when using Enum field as filter in Custom Query API

(6) ShareShare
ReportReport
Posted on by 45

I’ve created a custom query API for a custom table that includes an Enum field.

When I add the Enum field as a filter in the query, the API returns an incomplete response, even though the HTTP status code is 200 (OK). There is no explicit error message in the response.
If I remove the Enum field from the query filters, the API works correctly and returns the full expected response.

Is there a known limitation or configuration required when using Enum fields as filters in custom query APIs? Any guidance or best practices would be appreciated.


I have the same question (0)
  • Suggested answer
    Dhiren Nagar Profile Picture
    2,876 Super User 2026 Season 1 on at
    Hi,
     
    As such there is no limitation on using Enum field in API page as well as you can query with filters on Enum field. I've tried that and it works.

    Also in your screenshot I can see filter on date, code and Boolean field but no Enum field filter. Also make sure when you apply filter on Enum field, treat it same as text filter.
     
    I hope this helps.
     
    Regards,
    Dhiren.
  • Suggested answer
    OussamaSabbouh Profile Picture
    11,495 Super User 2026 Season 1 on at
    Hello,
     
    There’s no special configuration needed for Enum fields, but OData only supports a single $filter parameter — in your request you’re sending multiple $filters, which can silently break the response (200 OK with empty/incomplete value). The fix is to combine all conditions into one $filter using and, and make sure the Enum filter uses the exact enum value as exposed in $metadata (not the caption), sometimes as a fully qualified enum literal. Once you use one $filter + correct enum literal, the query API behaves correctly.
     
    Regards,
    Oussama Sabbouh
  • Harikrushna Sangani Profile Picture
    45 on at

    Thanks for the response!

    There is no filter applied at the API level. The filter is applied only when I select the query parameters in Postman.


    The image below shows the response without adding the filter row filter(type; Type) { } in the Query object, where Type is an enum data type.




    The next image shows the response with the filter row filter(type; Type) { } added to the Query object. However, no OData filter has been applied yet.

     








     
  • Suggested answer
    NAV_with_Narang Profile Picture
    2,320 Moderator on at
    Hi @Harikrushna Sangani  There is no limitation on using Enum field in API page + you can query with filters on enum as well.
  • Suggested answer
    Dhiren Nagar Profile Picture
    2,876 Super User 2026 Season 1 on at
     
    Even use of filter row is allowed in Query API. You can check the example given by Microsoft itself has the filter row.
     
     
    Regards,
    Dhiren.
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    21,573 Super User 2026 Season 1 on at

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans