Business Central : enum vs Options

With the release of Business Central 2020 Wave 1 lot of new features has been added to make product more prominent.

Though this concept of ENUM was introduced earlier but from new version onwards most of the option fields are available as extensible enum such as follows that means option fields goes away from table.

Based on few queries received thought lets write down few difference between enum and option.

An enumeration type, also known as an enum in programming, is a keyword used to declare a type that consists of a set of named constants. The list of named constants is called the enumeration list. Enums can be used as table fields, local and global variables, and parameters.In the OptionString Property of the field or variable, you can enter the option values as a comma-separated list. The Option type is a zero-based enumerator type, which means that the option values are assigned to sequential numbers, starting with 0. You can convert option data types to integers.
To declare an enum in AL you must specify an ID and nameTo define option need to add value as comma-seprated list
Enum with extensible property set to true can be extendedTo extend option value need to modify the base table and add the required value
How to define enum
enum 50110 MyList
    Extensible = true;
    value(0; None) { }
    value(1; First) { }
    value(2; Second) { }
    value(3; Third)
        Caption = ‘My List’;
How to define option
field(2; OptionField; option)
    OptionMembers = “Option with “, “spaces and “, “other symbols!”;

To extend the standard enum from base product visit here

Stay tune for more..

Author: Ammolh Saallvi

I'm a Dynamics NAV/Navision developer and helps partners and end-users with their NAV implementations. I do everything from third-party management advisory, training to new NAV teams, project management, training, setup and development. Do you want to hire me to help getting your project a success? Then contact me via dropping one email from linkedin Expertise in end-to-end development of software products from requirement analysis to System Study, Documentation and Testing. Demonstrated abilities in analyzing information system needs, evaluating end-user requirements, custom designing solutions, troubleshooting for complex information systems management. Deft at carrying out risk analysis, impact analysis, project reviews and documentation. Strong Problem solving & Technical skills coupled with confident decision making for enabling effective solutions leading to high customer satisfaction as well as low operational costs. Certifications:- Microsoft Certified Technology Specialist -Dynamics Microsoft Sure Step Certified Professional Moderator at DUG Forum Specialties: • ERP Implementation • Client/Server Programming • Coding, Testing, troubleshooting and documentation. • Database Tuning and SQL • Database Performance • Debugging large programs • Project Management and Resource Management.

2 thoughts on “Business Central : enum vs Options”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.