Use the Tok suffix for token labels (AC0027)

When a label value is identical to its name, the label represents a fixed token rather than translatable text. Such labels must use the ‘Tok’ suffix to make this intent explicit.

Token labels typically contain technical identifiers, API paths, or other values that mirror their variable name and should not be translated.

Example

The following label has a value identical to its name but lacks the ‘Tok’ suffix:

codeunit 50100 MyCodeunit
{
    var
        ApiVersion: Label 'ApiVersion', Locked = true; // Label 'ApiVersion' represents a token but does not use the required 'Tok' suffix. [AC0027]
}

To fix this, add the ‘Tok’ suffix:

codeunit 50100 MyCodeunit
{
    var
        ApiVersionTok: Label 'ApiVersion', Locked = true;
}

See also

  • AC0020 - Labels suffixed with Tok must be locked
  • AC0021 - Locked Label must have a suffix Tok