Enum value must have non-empty Caption to be selectable in the client
When defining an enum, a developer might set Caption = '' on a named value — expecting the platform to fall back to the value’s name, or simply leaving the property as a placeholder to fill in later. Business Central uses the Caption property
, not the name, to render enum values in dropdown lists. An empty Caption makes the value invisible: users see a blank entry or no entry at all, and cannot select it through the UI.
Set a Caption that describes the value to the user.
Example
The Open value below has an empty Caption and will not appear in dropdown lists, while Released shows up correctly:
enum 50100 "Sales Status"
{
value(0; Open)
{
Caption = ''; // The enum value 'Open' has an empty Caption and will not be shown or be selectable in the client. [AC0023]
}
value(1; Released)
{
Caption = 'Released';
}
}To fix this, provide a meaningful Caption:
enum 50100 "Sales Status"
{
value(0; Open)
{
Caption = 'Open';
}
value(1; Released)
{
Caption = 'Released';
}
}Exception
The diagnostic is not raised when the empty Caption is marked as Locked. This is the correct pattern for internal or sentinel enum values that are referenced in code but intentionally hidden from the UI:
enum 50100 "Sales Status"
{
value(0; Undefined)
{
Caption = '', Locked = true; // Internal sentinel — intentionally hidden from the UI
}
}See also
- AC0022 — Empty Enum value should not have a Caption property specified