# AppSourceCop Error AS0062
Page controls and actions must use the ApplicationArea property
## Description
Page controls and actions must use the ApplicationArea property to be visible to users. From runtime 11.0, you can specify on the application object level the ApplicationArea to use as default for all its controls and actions.
## Remarks
Application areas represent a feature in the system that offers developers, administrators, and users the ability to define differentiated user experiences. They are mapped to controls to show or hide them on page objects to enable more or fewer business scenarios. Controls or actions without application area are not displayed in SaaS.
This rule validates that the ApplicationArea property is set on actions and controls. See ../properties/devenv-applicationarea-property.
## How to fix this diagnostic?
You must add the ApplicationArea property.
## Code example triggering the rule
```al
page 50100 MyPage
{
    layout
    {
        area(Content)
        {
            field(MyField; 150) { }
        }
    }

    actions
    {
        area(Processing)
        {
            action(MyAction) { }
        }
    }
}
```
The field MyField and the action MyAction are not valid because they do not have the ApplicationArea property set.
## Code example not triggering the rule
### ApplicationArea property set on each members
```al
page 50100 MyPage
{
    layout
    {
        area(Content)
        {
            field(MyField; 150)
            {
                ApplicationArea = All;
            }
        }
    }

    actions
    {
        area(Processing)
        {
            action(MyAction)
            {
                ApplicationArea = All;
            }
        }
    }
}
```
The field MyField and the action MyAction are valid because they have the ApplicationArea property set.
### ApplicationArea property set on the object
From runtime version 10.0, field, part, and action controls without ApplicationArea inherit the ApplicationArea defined on the page/report level.
The following code will then not trigger this analyzer diagnostic.
```al
page 50100 MyPage
{
    ApplicationArea = All;

    layout
    {
        area(Content)
        {
            field(MyField; 150)
            {
                // ApplicationArea is inherited from the page.
            }
        }
    }

    actions
    {
        area(Processing)
        {
            action(MyAction)
            {
                // ApplicationArea is inherited from the page.
            }
        }
    }
}
```
> NOTE
> This inheritance does not apply to members defined in extension objects like page extensions or report extensions.
## Related information
AppSourceCop Analyzer<appsourcecop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>
../properties/devenv-applicationarea-property

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0062, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0062/
