Action property duplicates the value of its RunObject target
An action with RunObject = Page X or RunObject = Report X uses the target’s Caption, ToolTip, AboutTitle and AboutText for each of these properties it does not set itself. The compiler does not copy the text: it writes a reference to the target’s property into the action’s metadata, and the client shows the target’s translated value.
With runtime version 18.0, the
ToolTipproperty can be set at the page object level. When a navigation action hasRunObject = page Xand the target page has aToolTipset, the action inherits the page’s tooltip if no tooltip is explicitly specified on the action itself. This mirrors the existing behavior for reports.
— ToolTip Property on Microsoft Learn
An action that repeats the target’s value is translated twice. The XLIFF file gets a trans-unit for the action, noted as Page Sales Overview - Action Customers - Property Caption, next to the one for the target, Page Customer List - Property Caption. Both trans-unit ids end in Property 2879900210 and both carry Customers as their source. When a translator updates only the page caption, the action keeps the old translation and the menu shows a different word than the page it opens. Remove the property from the action and let it inherit the target’s value.
Example
page 50101 "Customer List"
{
Caption = 'Customers';
ToolTip = 'View and edit customers.';
// ...
}
page 50100 "Sales Overview"
{
actions
{
area(Processing)
{
action(Customers)
{
Caption = 'Customers'; // The Caption of action 'Customers' has the same value as the Caption of its RunObject page 'Customer List' and can be removed [AC0036]
ToolTip = 'View and edit customers.'; // The ToolTip of action 'Customers' has the same value as the ToolTip of its RunObject page 'Customer List' and can be removed [AC0036]
ApplicationArea = All;
Image = Customer;
RunObject = Page "Customer List";
}
}
}
}Remove the duplicated properties. Through RunObject the action shows the page’s caption and tooltip:
page 50100 "Sales Overview"
{
actions
{
area(Processing)
{
action(Customers)
{
ApplicationArea = All;
Image = Customer;
RunObject = Page "Customer List";
}
}
}
}When the diagnostic is reported
- The app’s
runtimeinapp.jsonis 18.0 (Business Central 2026 release wave 2) or higher. The rule is gated on that release as a whole: on a lower runtime nothing is reported, includingCaptionduplicates. - The action is a plain
actionwith aRunObjectthat points to a page or a report. - The action’s
Caption,ToolTip,AboutTitleorAboutTexthas the same text as the same property of the target. A report target’sCaptionandToolTipcome from the report object; itsAboutTitleandAboutTextcome from itsrequestpage. - The diagnostic is reported on the action’s property, once for every duplicated property.
- A
modify(ActionName)block in a page extension is reported when the base action has a page or reportRunObject, does not set the property itself, and themodifysets the same text as the target. - The comparison is case-sensitive and looks at the text only:
Locked,CommentandMaxLengthare ignored.
Exception
The rule does not compare a property when either side uses its multilanguage variant (CaptionML, ToolTipML, AboutTitleML, AboutTextML). Obsolete actions and obsolete targets, groups, actionrefs, other action kinds, codeunit, query and xmlport targets, and page customizations are not reported. The AboutTitle and AboutText of a report from a dependency’s symbol package are not compared, because its request page is not visible to the analyzer.
Removing the ToolTip copy is safe: Microsoft’s CodeCop AA0218
accepts a tooltip the action inherits from its RunObject target. AC0011
does not yet accept the inherited caption (ALCops/Analyzers#667
), so removing the Caption copy triggers AC0011 until that rule is updated. Until then, keep the Caption copy deliberately and suppress AC0036 on that line:
action(Customers)
{
// AC0011 does not yet accept the caption inherited from RunObject.
#pragma warning disable AC0036
Caption = 'Customers';
#pragma warning restore AC0036
ApplicationArea = All;
RunObject = Page "Customer List";
}Code fix
The code fix removes the reported property from the action or from the modify block. The action then shows the target’s value, and the action’s own trans-unit disappears from the next XLIFF export. Fix All removes every duplicated property in the document or in the project, including two properties of the same action.
The code fix is not offered when the property carries a compiler directive: a #if, #pragma or #region line directly above it, an inactive #if block that ends on the line above it, or a directive inside its span. A directive line is attached to the line that follows it, so removing the property would also remove the directive. In that case, delete the property by hand. A #pragma block around the previous property does not keep the fix from being offered on a property further down, as long as no directive line sits directly above it.
A comment line directly above the property is removed together with the property; a comment at the end of the property’s line is removed too, but leaves an empty line. When the fix removes the last property of a modify(ActionName) block that has no triggers, the whole block is removed, because an empty modify block does not compile.
See also
- RunObject Property on Microsoft Learn
- Multilanguage development on Microsoft Learn
- AC0029 : Duplicate ToolTip between page and table field