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

Enums and EDTs best practices

(0) ShareShare
ReportReport
Posted on by 1,847
Hi,
 
When creating an enum, is it better to create an EDT for it as well and specify the enum type
 
and when adding a field to the table, then we'll put the EDT as extended data type 
 
Or shall we just create the enum alone. And add this enum to the table as a field?
I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    Enums and EDTs best practices
    Hi,
     
    It depends on the situation. For example, for one field you need to set the label as "Test". For other fields you need to set the label as Test1.
    In that case you can create a Enum with label as "Test". On the other hand, if you want "Test1" then create an EDT and mention the label as "Test1" and set the Enum type property.
    Similarly, its applicable to configuration key, help text etc. also.
    For example, you can refer to EDT "ABCModelType" where there is a configuration key mentioned. On the other hand, when you see the base Enum ABCModel there is no configuration key mapped. Both this EDT and Enum are used in different tables based on the requirement.
     
    Thanks,
    Girish S.
  • .. Profile Picture
    1,847 on at
    Enums and EDTs best practices
    Hi Andre,
     
    Yes I looked at a standard example and the enum was used directly. However, for example there is NoYesId EDT related to NoYesEnum.
     
    Currently I created a new Enum, so I'm not sure if I should create an EDT and link it to the field. Or shall i use the enum directly? What do you think? Since it's a new enum, then i think the label i will put for the enum is the same label I want to use for the field or what?
     
     
    Also what is configuration key?
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    297,785 Super User 2025 Season 2 on at
    Enums and EDTs best practices
    Hi IntegrationBeginner,
     
    This depends on the exact use case. When you look at e.g. the AssetType, then the enum is directly used. In cases where e.g. the label or configuration key should be different, you can create the EDT based on the enum.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 844 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 752 Super User 2025 Season 2

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 553

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans