Reserve Enum value zero (0) for empty value (AC0019)
Zero (0) should be reserved as the empty Enum value. Business Central stores Enums as integers and does not support null; new records (and existing records after adding a field via table extension) default to 0, which makes non-empty meaning at 0 ambiguous.
By reserving 0 as an empty sentinel value, you ensure that default record states are clearly distinguished from intentional enum selections.
Example
The following enum assigns a meaningful value to 0:
enum 50100 MyEnum
{
value(0; MyValue) // Enum 'MyEnum' with value 0 must have an empty Name and Caption. [AC0019]
{
Caption = 'My Value';
}
}
To fix this, reserve 0 as the empty value and shift meaningful values to start at 1:
enum 50100 MyEnum
{
value(0; " ")
{
Caption = '';
}
value(1; MyValue)
{
Caption = 'My Value';
}
}