# AppSourceCop Error AS0050
The extensibility of an application object cannot be removed
## Description
The extensibility of an application object cannot be removed.
## Remarks
This rule verifies that an object that was extensible in the previous version of the extension, remains extensible in the current version of the extension.
The extensibility of an object is defined by the ../properties/devenv-extensible-property property.
> NOTE
> The default property value for the Extensible property differs depending on the object type. See ../properties/devenv-extensible-property property.
## Code examples triggering the rule
### Example 1 - Changing the Extensible property value from true to false
Version 1.0 of the extension defines a page which is extensible:
```al
page 50100 MyPage
{
    Extensible = true;
}
```
Version 2.0 of the extension:
```al
page 50100 MyPage
{
    Extensible = false;
}
```
In version 2.0, the page is not extensible anymore. If a dependent extension extends this page, this will lead to a compilation error similar to `The object Page 'MyPage' is not extensible. AL(0564)`.
For example, the following extension compiles when depending on version 1.0, but fails to compile with version 2.0:
```al
pageextension 50120 SomePageExtension extends MyPage
{
}
```
### Example 2 - Removing the extensible property on an Enum
The version 1.0 of the extension defines an enum which is extensible:
```al
enum 50100 MyEnum
{
    Extensible = true;

    value(50100; MyEnumValue) { }
}
```
Version 2.0 of the extension:
```al
enum 50100 MyEnum
{
    value(50100; MyEnumValue) { }
}
```
In version 2.0, the enum is not extensible anymore, because the default extensibility for enums is false. If a dependent extension extends this enum, this will lead to a compilation error similar to `The object Enum 'MyEnum' is not extensible. AL(0564)`.
For example, the following extension compiles when depending on version 1.0, but fails to compile with version 2.0:
```al
enumextension 50120 SomeEnumExtension extends MyEnum
{
}
```
## Code examples not triggering the rule
In the following examples, the version 1.0 of the extension defines an enum which is not extensible.
Version 1.0 of the extension:
```al
enum 50100 MyEnum
{
    Extensible = false;

    value(50100; MyEnumValue) { }
}
```
### Example 1 - Changing the Extensible property value from false to true
Version 2.0 of the extension:
```al
enum 50100 MyEnum
{
    Extensible = true;

    value(50100; MyEnumValue) { }
}
```
In version 2.0, the enum MyEnum is now extensible by dependent extensions.
### Example 2 - Removing the Extensible property on a non extensible Enum
Version 2.0 of the extension:
```al
enum 50100 MyEnum
{
    value(50100; MyEnumValue) { }
}
```
In version 2.0, the enum MyEnum remains not extensible, because the default property value is also false for enums.
### Example 3 - Removing the Extensible property on object types which are extensible by default
For object for which the default property value for the Extensible property is true, removing the property makes the object extensible.
## Related information
AppSourceCop Analyzer<appsourcecop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

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-as0050, 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-as0050/
