ApplicationArea redundancy

Properties
LC0020 Info Design Code Fix Ignore Obsolete

Since Business Central 2022 release wave 2, page controls without an explicit ApplicationArea inherit the value from the parent page:

The property inheritance means that page controls without the ApplicationArea property explicitly set, inherit the ApplicationArea defined on the parent page or report if it’s a request page.

ApplicationArea Property on Microsoft Learn

When individual controls repeat the same value that is already defined at the page level, the declaration is redundant. If the page-level value later changes — say from All to Basic, Suite — every control that still repeats the old value silently keeps it. The page says one thing, the controls say another, and nothing flags the mismatch at compile time.

Example

The following control redundantly specifies the same ApplicationArea as the page:

page 50100 MyPage
{
    ApplicationArea = All;

    layout
    {
        area(Content)
        {
            field(MyField; MyField)
            {
                ApplicationArea = All; // ApplicationArea redundancy [LC0020]
            }
        }
    }
}

To fix this, remove the redundant property from the control:

page 50100 MyPage
{
    ApplicationArea = All;

    layout
    {
        area(Content)
        {
            field(MyField; MyField)
            {
            }
        }
    }
}

See also

  • LC0019 — DataClassification redundancy
  • LC0094 — AllowInCustomizations redundancy