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 :
Business Central forum

How to use Enums to extend Options Fields?

(0) ShareShare
ReportReport
Posted on by 40

Hello everyone, 

We are migrating code to AL, and I have some options agregated to an option field in a standard table. I read that you can't extend that option field with a table extension of that table, but you can resolve this problem using Enums and Enums extensions. In July's release (https://blogs.msdn.microsoft.com/nav/2018/07/30/developer-preview-july-2018-update/), they explain about it and it says that the standard tables now have some new properties like "Extensible" (which needs to be mark as "Yes") and EnumTypeID (which gives you the ID necessary to linked that option field and the object enum who extends it).

¿Do I understand it correctly? ¿What happend if the option field for the standard object doesn't give that information in their properties? ¿Do we need to wait to the next release to resolve this problem?


I read a lot of similar questions in the GIT's AL thread, but microsoft always redirect you to the same page information (but it only have and example that use a new object, not an extension of a standard object): https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extensible-enums

Thank you!

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    Standard code is actually not refactored by using Enums. The process is planned but not all code will be released with enums soon.

    You can use Enums for your extensions and I recommend you to do so instead of using Option fields.

  • ravuri suresh Profile Picture
    246 on at

    Hi  Judit Navarro,

    Have you extended option fields in the Extension or are you used Enum instead of option fields.

    please let me know.

    Thank you,

    Suresh Ravuri

  • Judit Navarro Profile Picture
    40 on at

    Hello,

    We're waiting to see if Microsoft say something more about Enums...

  • ravuri suresh Profile Picture
    246 on at

    ok thank you for your response.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans