AX / D365FO – EXPORT DATA ENTITY ENUM FIELDS LABELS IN BYOD USING COMPUTED COLUMNS OR VIRTUAL FIELDS
When you export a Data Entity in BYOD the base enums fields values are shown as integer values. This is a big problem because it’s very difficult to understrand the real value of the field. To solve this issue you can extend the standard data entity or modify a custom one using a virtual field or a computed column. Using computed column In this example we’ll add a new computed column to decode the PostingType enum field description. First of all create an extension of the Data Entity (GeneralJournalAccountEntryEntity) and add the new virtual field (Al0PostingTypeDesc) by right-clicking on fields > String unmapped value Set “Is Computed field” property to YES Now create a new class and add a static method ( getPostingTypeDescription() ) like in example shown below [ExtensionOf(tableStr(GeneralJournalAccountEntryEntity))] final class Al0GeneralJournalAccountEntryEntity_Extension { public static str getPostingTypeDescription() { ...