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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to create a dropdown with options

(0) ShareShare
ReportReport
Posted on by 89

Hi all, I'm having difficulty creating a dropdown field with 3 options in VS Code. There seems to be a good amount of information online but I have failed to get them to work. This looks like the desired result: 

pastedimage1664828902211v1.png

Things I've tried:

  • Create a table for dropdown options and add a field with a relation to the table. This isn't ideal since it does not look like the above and also seems unnecessarily complex.
  • Create an Enum for dropdown options (per https://yzhums.com/5985/). The dropdown looks like above but selecting anything doesn't actually update the table!
  • Using fieldgroups. I haven't figured out the logic behind fieldgroups nor have I gotten them to work. 

Any advice is appreciated. Thanks!

I have the same question (0)
  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    If you define a field based on your enum the database will be updated.

    Another alternative is to use the option data type in AL. Works pretty much the same as an enum but can not be extened.

    Maybe you should share your table definition if you can not get it to work?

  • Verified answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at

    Hi, Hi, there is nothing wrong with using Enum, some of the standard functions also use Enum. It will be stored in the table as an Integer.
    For example,

    Account Type in General Journals:

    pastedimage1664842634714v1.png

    pastedimage1664842704302v2.png

    pastedimage1664842734639v3.png

    Hope this helps.

    Thanks.

    ZHU

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,371 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,806 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,371

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans