Captions must be defined on user-facing objects and controls
Properties
AC0011
Info
Design
Code Fix
Ignore Obsolete
When a page, table field, action, or other user-facing element is declared without a Caption property, no entry appears in the XLIFF translation file. The extension cannot be localized — users in other locales see a label derived from the AL identifier in the developer’s language.
Add an explicit Caption property on each object and control that the user sees.
Example
The following page action is missing a Caption:
page 50100 "Sales Overview"
{
Caption = 'Sales Overview';
actions
{
area(Processing)
{
action(Post) // A user-facing object or control is missing a Caption. [AC0011]
{
trigger OnAction()
begin
end;
}
}
}
}To fix this, add a Caption property:
page 50100 "Sales Overview"
{
Caption = 'Sales Overview';
actions
{
area(Processing)
{
action(Post)
{
Caption = 'Post';
trigger OnAction()
begin
end;
}
}
}
}When the diagnostic is reported
The rule checks the following elements for an explicit Caption, CaptionClass, or CaptionML property:
- Pages, tables, and queries
- Table fields and page fields
- Page groups and action groups
- Page actions
- Enum values with a non-empty name
- Assignable permission sets (
Assignablenot set tofalse) - Analysis views
Exception
- API pages — pages with
PageType = APIand all controls and actions within them are exempt. API pages serve data to integrations and do not render captions in the client. - Page fields sourced from a table field — when a page field references a table field (
field(MyField; Rec."My Field")), the diagnostic is raised only if both the page field and the underlying table field lack a Caption. - Page parts referencing another page — a part control only triggers the diagnostic when both the part and the related page lack a Caption.
ShowCaption = false— controls where the caption is explicitly hidden are not checked.- Predefined action area names — built-in action category names (Processing, Navigation, Reporting, etc.) are skipped on action groups.
- Non-interactive page controls — Area, Grid, Repeater, UserControl, and SystemPart controls are not checked.
See also
- Caption Property on Microsoft Learn
- Working with Translation Files on Microsoft Learn