Explicitly set AllowInCustomizations for excluded fields (AC0026)

Fields that are not included on pages can still be exposed through page customizations. To avoid unintended visibility or customization behavior, the AllowInCustomizations property must be set explicitly for such fields.

This ensures that developers consciously decide whether omitted fields should be available for user customizations, preventing accidental exposure of internal or deprecated fields.

Example

The following table field is not exposed on any page and lacks the AllowInCustomizations property:

table 50100 MyTable
{
    fields
    {
        field(1; "No."; Code[20]) { }
        field(2; InternalField; Integer) // Field 'InternalField' is not exposed on any page and should explicitly define AllowInCustomizations. [AC0026]
        {
        }
    }
}

page 50100 MyPage
{
    SourceTable = MyTable;

    layout
    {
        area(Content)
        {
            field("No."; Rec."No.") { }
        }
    }
}

To fix this, explicitly set the AllowInCustomizations property:

table 50100 MyTable
{
    fields
    {
        field(1; "No."; Code[20]) { }
        field(2; InternalField; Integer)
        {
            AllowInCustomizations = false;
        }
    }
}