ApplicationArea redundancy (LC0020)
The ApplicationArea property set on a page automatically applies to all its controls. When individual controls repeat the same value that is already defined at the page level, the declaration is redundant.
Redundant property declarations clutter the code with repeated lines that carry no additional meaning. They also increase the maintenance burden: if the page-level application area changes, every control that duplicates the old value must be updated individually. Over time this creates a risk that control-level values drift out of sync with the intended page-level default.
A code fix is available for this diagnostic.
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;
}
}
}
}To fix this, remove the redundant property from the control:
page 50100 MyPage
{
ApplicationArea = All;
layout
{
area(Content)
{
field(MyField; MyField)
{
}
}
}
}