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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Why does an enum support 251 values (and not 256)?

(1) ShareShare
ReportReport
Posted on by 2
"[Y]ou can declare up to 251 (0 to 250) literals in a single enum type"
 
This restriction seems rather odd to me. Why 251, specifically? Given how close it is in value to 256, it seems logical to conclude that enums are stored under the hood as bytes - but if so, why not let us use all 256 possible values?
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    308,171 Super User 2026 Season 2 on at
    Hi JB,
     
     
    This is a design decision that comes from Dynamics AX version 1.0. It has never been changed anymore. Do you really need 256 enumerations?

    In the SQL database, it is not a byte, at least not anymore. It is stored as BigInt. In the past, I did a test and was able to write and read data with X++ coding using a value of 1000 and higher. I was bypassing the enumeration data type for this test.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 282 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 211 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans