Table field must define a ToolTip
Since runtime 13.0, the ToolTip property can be defined on table fields. A tooltip set at the table level is automatically inherited by every page control that references the field — the same way a caption is.
When a page field has a ToolTip but the underlying table field does not, the tooltip text lives only on that page. Every other page that displays the same field needs its own copy. Updating the text later means finding and editing every page independently; the ones you miss go stale.
Define the ToolTip on the table field and remove it from the page field.
With runtime version 13.0, the
ToolTipproperty is available for table fields. A table field tooltip will, like the caption, be applied on page controls that reference the table field. This allows you to specify the tooltip in one place and have it applied to all controls that reference the table field.— ToolTip Property on Microsoft Learn
Example
The page field defines a ToolTip, but the underlying table field does not:
table 50100 MyTable
{
fields
{
field(1; MyField; Code[20]) { }
}
}
page 50100 MyPage
{
SourceTable = MyTable;
layout
{
area(Content)
{
field(MyField; Rec.MyField) // Table field must define a ToolTip [AC0028]
{
ToolTip = 'Specifies the value.';
}
}
}
}Move the ToolTip to the table field:
table 50100 MyTable
{
fields
{
field(1; MyField; Code[20])
{
ToolTip = 'Specifies the value.';
}
}
}
page 50100 MyPage
{
SourceTable = MyTable;
layout
{
area(Content)
{
field(MyField; Rec.MyField) { }
}
}
}The diagnostic also triggers on page extension objects when the page extension field has a ToolTip but the table field does not.
Code action
The AL Language extension for Visual Studio Code includes a code action that moves tooltips from page controls to their underlying table fields automatically. The action is available from runtime 13.0. For more information, see AL code actions on Microsoft Learn.
See also
- AC0029 - Duplicate ToolTip between page and table field
- Add tooltips to table and page fields on Microsoft Learn