Empty Enum value should not have a Caption property specified

Properties
AC0022 Warning Design Code Fix Ignore Obsolete

When defining an enum that reserves ordinal zero for “no selection”, developers sometimes assign a Caption to the empty value — expecting it to appear in the client when no option is selected. Empty enum values (those with a blank name "") are sentinel values in Business Central: the platform does not display them, does not let users select them, and does not expose them to AL code. The Caption on such a value is dead metadata that the platform silently ignores.

Remove the Caption property from the empty enum value. This rule targets only truly empty names (""); a single space (" ") is a distinct, non-empty value and is not flagged.

Example

enum 50100 "Document Status"
{
    value(0; "")
    {
        Caption = 'None'; // Empty Enum value should not have a Caption property specified [AC0022]
    }
    value(1; "Open")
    {
        Caption = 'Open';
    }
}

To fix this, remove the Caption property:

enum 50100 "Document Status"
{
    value(0; "") { }
    value(1; "Open")
    {
        Caption = 'Open';
    }
}

See also

  • AC0023 - Enum value must have non-empty Caption to be selectable in the client