Skip to content
Arthur van de Vondervoort edited this page Apr 6, 2024 · 5 revisions

Explicitly set AllowInCustomizations for fields omitted on pages.

This rule ensures that the AllowInCustomizations property is set appropriately for fields on table(extensions) that are omitted on the page. The AllowInCustomizations property manage the visibility of fields in the UI, mitigating potential risks associated with unintended exposure.

Example

table 50100 "My Setup Table"
{
    fields
    {
        field(1; "Primary Key"; Code[10])
        {
            AllowInCustomizations = Never;
            Caption = 'Primary Key';
            DataClassification = SystemMetadata;
            NotBlank = false;
        }
    }
}

Field accessibility level

field(1; "My Secret"; Guid)
{
    Access = Local; // The diagnostic will not be raised if the Access is set to Local or Protected
}

When setting the Access Property of a field on Local or Protected, the diagnostic will not be raised.

External references