{"title":"AppSourceCop Error AS0050","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0050/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0050","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"The extensibility of an application object cannot be removed.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0050","slug":"appsourcecop-error-as0050","at":0,"chars":3243},{"level":2,"title":"Description","slug":"description","at":89,"chars":77},{"level":2,"title":"Remarks","slug":"remarks","at":166,"chars":424},{"level":2,"title":"Code examples triggering the rule","slug":"code-examples-triggering-the-rule","at":590,"chars":1455},{"level":3,"title":"Example 1 - Changing the Extensible property value from true to false","slug":"example-1---changing-the-extensible-property-value-from-true-to-false","at":627,"chars":664},{"level":3,"title":"Example 2 - Removing the extensible property on an Enum","slug":"example-2---removing-the-extensible-property-on-an-enum","at":1291,"chars":754},{"level":2,"title":"Code examples not triggering the rule","slug":"code-examples-not-triggering-the-rule","at":2045,"chars":1051},{"level":3,"title":"Example 1 - Changing the Extensible property value from false to true","slug":"example-1---changing-the-extensible-property-value-from-false-to-true","at":2308,"chars":269},{"level":3,"title":"Example 2 - Removing the Extensible property on a non extensible Enum","slug":"example-2---removing-the-extensible-property-on-a-non-extensible-enum","at":2577,"chars":286},{"level":3,"title":"Example 3 - Removing the Extensible property on object types which are extensible by default","slug":"example-3---removing-the-extensible-property-on-object-types-which-are-extensible-by-default","at":2863,"chars":233},{"level":2,"title":"Related information","slug":"related-information","at":3096,"chars":147}],"text":"# AppSourceCop Error AS0050\nThe extensibility of an application object cannot be removed\n## Description\nThe extensibility of an application object cannot be removed.\n## Remarks\nThis rule verifies that an object that was extensible in the previous version of the extension, remains extensible in the current version of the extension.\nThe extensibility of an object is defined by the ../properties/devenv-extensible-property property.\n> NOTE\n> The default property value for the Extensible property differs depending on the object type. See ../properties/devenv-extensible-property property.\n## Code examples triggering the rule\n### Example 1 - Changing the Extensible property value from true to false\nVersion 1.0 of the extension defines a page which is extensible:\n```al\npage 50100 MyPage\n{\n    Extensible = true;\n}\n```\nVersion 2.0 of the extension:\n```al\npage 50100 MyPage\n{\n    Extensible = false;\n}\n```\nIn 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)`.\nFor example, the following extension compiles when depending on version 1.0, but fails to compile with version 2.0:\n```al\npageextension 50120 SomePageExtension extends MyPage\n{\n}\n```\n### Example 2 - Removing the extensible property on an Enum\nThe version 1.0 of the extension defines an enum which is extensible:\n```al\nenum 50100 MyEnum\n{\n    Extensible = true;\n\n    value(50100; MyEnumValue) { }\n}\n```\nVersion 2.0 of the extension:\n```al\nenum 50100 MyEnum\n{\n    value(50100; MyEnumValue) { }\n}\n```\nIn 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)`.\nFor example, the following extension compiles when depending on version 1.0, but fails to compile with version 2.0:\n```al\nenumextension 50120 SomeEnumExtension extends MyEnum\n{\n}\n```\n## Code examples not triggering the rule\nIn the following examples, the version 1.0 of the extension defines an enum which is not extensible.\nVersion 1.0 of the extension:\n```al\nenum 50100 MyEnum\n{\n    Extensible = false;\n\n    value(50100; MyEnumValue) { }\n}\n```\n### Example 1 - Changing the Extensible property value from false to true\nVersion 2.0 of the extension:\n```al\nenum 50100 MyEnum\n{\n    Extensible = true;\n\n    value(50100; MyEnumValue) { }\n}\n```\nIn version 2.0, the enum MyEnum is now extensible by dependent extensions.\n### Example 2 - Removing the Extensible property on a non extensible Enum\nVersion 2.0 of the extension:\n```al\nenum 50100 MyEnum\n{\n    value(50100; MyEnumValue) { }\n}\n```\nIn version 2.0, the enum MyEnum remains not extensible, because the default property value is also false for enums.\n### Example 3 - Removing the Extensible property on object types which are extensible by default\nFor object for which the default property value for the Extensible property is true, removing the property makes the object extensible.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}