ApplicationCop
ApplicationCop inspects how objects are modeled: tables, fields, pages, enums, labels and permissions. Flagged code compiles and runs, but the object behaves unlike the standard application: a primary key that accepts a blank value, an action without a caption. Where PlatformCop asks whether code works, ApplicationCop asks whether it fits Business Central.
Rules
| ID | Title | Severity | Enabled | Code Fix |
|---|---|---|---|---|
| AC0001 | DrillDownPageId and LookupPageId property must be defined for tables used in list pages | Info | ✓ | |
| AC0002 | Single-field primary key requires the NotBlank property | Warning | ✓ | ✓ |
| AC0003 | Set NotBlank property to false when No. Series TableRelation exists | Warning | ✓ | ✓ |
| AC0004 | Confirm() must be implemented through the Confirm Management codeunit | Info | ✓ | |
| AC0005 | GlobalLanguage() must be implemented through the Translation Helper codeunit | Info | ✓ | ✓ |
| AC0006 | Use the Page Management codeunit instead of invoking Page.Run directly | Warning | ✓ | ✓ |
| AC0007 | Install and Upgrade codeunits should have Access set to Internal | Warning | ✓ | ✓ |
| AC0008 | DataPerCompany must be explicitly set on table objects | Info | — | |
| AC0009 | The Caption of permissionset objects should not exceed the maximum length | Warning | ✓ | ✓ |
| AC0010 | All application objects must be covered by a PermissionSet | Warning | ✓ | |
| AC0011 | Captions must be defined on user-facing objects and controls | Info | ✓ | |
| AC0012 | Integration events must not be declared in codeunits with Access set to Internal | Warning | ✓ | ✓ |
| AC0013 | DropDown and Brick fieldgroups must be defined | Info | — | |
| AC0014 | ToolTip must end with a punctuation | Info | ✓ | |
| AC0015 | ToolTip should start with Specifies | Info | ✓ | |
| AC0016 | Do not use line breaks in ToolTip | Info | ✓ | |
| AC0017 | ToolTip should not exceed 200 characters | Info | ✓ | |
| AC0018 | Empty captions should be locked | Warning | ✓ | ✓ |
| AC0019 | Reserve Enum value zero (0) for empty value | Info | ✓ | |
| AC0020 | Labels suffixed with Tok must be locked | Warning | ✓ | ✓ |
| AC0021 | Locked Label must have a suffix Tok | Info | — | |
| AC0022 | Empty Enum value should not have a Caption property specified | Warning | ✓ | |
| AC0023 | Enum value must have non-empty Caption to be selectable in the client | Warning | ✓ | |
| AC0024 | Event publisher methods should not be public | Warning | ✓ | ✓ |
| AC0025 | Use the (CR)LFSeparator from the Type Helper codeunit | Info | ✓ | |
| AC0026 | Explicitly set AllowInCustomizations for excluded fields | Info | ✓ | |
| AC0027 | Use the Tok suffix for token labels | Info | ✓ | |
| AC0028 | Table field must define a ToolTip | Info | ✓ | |
| AC0029 | Duplicate ToolTip between page and table field | Info | ✓ | |
| AC0030 | Use return value for better error handling | Info | ✓ | |
| AC0031 | Table data access requires explicit object permissions | Info | ✓ | ✓ |
| AC0032 | Unused permission declared | Info | ✓ | ✓ |
| AC0033 | Rest Client requires an Http Client Handler implementation | Warning | ✓ | |
| AC0034 | Telemetry requires a Telemetry Logger implementation | Warning | ✓ |
Note: Rules marked with “—” in the Enabled column are disabled by default and must be explicitly enabled in your project’s ruleset file.