Install and Upgrade codeunits should have Access set to Internal

Properties
AC0007 Warning Design Code Fix Ignore Obsolete

When you create a codeunit with SubType = Install or SubType = Upgrade, the Access property defaults to Public. Other extensions can reference its procedures — even though those procedures exist only to run during installation or upgrade and were never intended as an API.

Once an external extension calls into your Install or Upgrade codeunit, any refactoring of that logic — renaming a helper procedure, changing its parameters, removing it after the data migration is complete — becomes a breaking change for the dependent extension.

Set Access = Internal to restrict the codeunit to its own extension.

Example

The following Install codeunit does not set Access, so it defaults to Public:

codeunit 50100 MyCodeunit // Install and Upgrade codeunits should have Access set to Internal [AC0007]
{
    SubType = Install;

    trigger OnInstallAppPerCompany()
    begin
    end;
}

To fix this, set Access = Internal. The same applies to codeunits with SubType = Upgrade:

codeunit 50100 MyCodeunit
{
    Access = Internal;
    SubType = Install;

    trigger OnInstallAppPerCompany()
    begin
    end;
}

See also