The Caption of permissionset objects should not exceed the maximum length (AC0009)

PermissionSet captions should remain within a defined maximum length (30 characters) to avoid issues in translated captions. When no MaxLength or Locked subproperty is specified, translations can exceed the intended limit and cause inconsistent or truncated UI labels.

Setting an explicit MaxLength constraint or marking the caption as Locked ensures that translated captions do not break the UI or cause display issues.

A code fix is available for this diagnostic.

Example

The following permission set has a caption that may exceed the limit in translations:

permissionset 50100 MyPermissionSet
{
    Caption = 'This is a very long caption that exceeds the maximum length'; // The Caption of permissionset objects should not exceed 30 characters. Use MaxLength=30 or Locked=true to ensure there are no translations that exceed this limit. [AC0009]
}

To fix this, either shorten the caption and set MaxLength, or mark it as Locked:

permissionset 50100 MyPermissionSet
{
    Caption = 'My Permission Set', MaxLength = 30;
}

Or, if the caption should not be translated:

permissionset 50100 MyPermissionSet
{
    Caption = 'My Permission Set', Locked = true;
}