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

Community site session details

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

API to retrieve Enum number and caption

(0) ShareShare
ReportReport
Posted on by 3,106
Hi All
I have created an API to retrieve change log entries table. The issue is old value, new value shows the enum number (1,2,3) rather than open, release, close etc. Is there a way to create an API to display enums themselves so the API will show. 
1, Open
2, release
3,Close
Using this we can link to the numbers in change log entries
I have the same question (0)
  • Suggested answer
    Sahan Hasitha Profile Picture
    383 on at
    API to retrieve Enum number and caption
     
    hi
    when exposing change log entries through an API, the old and new values often appear as enum numbers (such as 0, 1, 2) instead of captions like Open, Released, or Closed. To solve this, you can extend the API page and add a calculated field that converts the stored integer value into the corresponding enum caption using AL code. This way, the API returns both the numeric value and its readable description. Another option is to create a separate reference API that lists all enum values alongside their captions, so external systems can easily map numbers to text. Both methods ensure that your API consumers can work with meaningful data rather than just raw numeric values.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,707

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,675 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,228 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans