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...
Answered

How to create a dropdown with options

(0) ShareShare
ReportReport
Posted on by 77

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
    Inge M. Bruvik Profile Picture
    1,057 Moderator on at
    RE: How to create a dropdown with options

    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
    93,872 Super User 2025 Season 2 on at
    RE: How to create a dropdown with options

    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

Responsible AI policies

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

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,214

#2
Sumit Singh Profile Picture

Sumit Singh 2,145

#3
YUN ZHU Profile Picture

YUN ZHU 1,887 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans