Enumerated types, as discussed in the previous chapter, provide the user with a set of fixed options that we can code directly against. We understand at design time what they mean, as opposed to user-defined lists, which could represent anything.
Referenced as base enums in the AOT, they can be used directly on a table or referenced by an EDT, which, in turn, is added to the table. The reason for this is so that we can abstract and reuse a generic option list.
For example, the NoYes
base enum has no label, but it offers the No
and Yes
options (No
is first as it will be the default option). From this, we might create an EDT called ConAreYouSure
, which has the Are you sure
label. We can then use this label to create fields or dialog controls, and the interface can automatically use the Are you sure
label and show the No
and Yes
options. This means we have one base enum that is reused in several places. This is ideal for general-purpose usage. We create new elements under the appropriate node in our project; the steps used to create a base enum are as follows:
Combo box
is usually fine.Yes
; this tells AX to use the EnumValue property of each element, allowing us to manually specify the value that AX stores in the database.52.14.240.252