{"title":"AppSourceCop Error AS0032","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0032/","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-as0032, 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-as0032","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":"Controls that have been published must not be deleted, because it will break dependent extensions.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0032","slug":"appsourcecop-error-as0032","at":0,"chars":2900},{"level":2,"title":"Description","slug":"description","at":83,"chars":114},{"level":2,"title":"Remarks","slug":"remarks","at":197,"chars":329},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":526,"chars":457},{"level":2,"title":"Examples of errors for dependent extensions","slug":"examples-of-errors-for-dependent-extensions","at":983,"chars":1770},{"level":3,"title":"Example 1 - Extensions modify this control","slug":"example-1---extensions-modify-this-control","at":1336,"chars":453},{"level":3,"title":"Example 2 - Extensions referencing this control as an anchor for a change","slug":"example-2---extensions-referencing-this-control-as-an-anchor-for-a-change","at":1789,"chars":546},{"level":3,"title":"Example 3 - Extensions moving this control","slug":"example-3---extensions-moving-this-control","at":2335,"chars":418},{"level":2,"title":"Related information","slug":"related-information","at":2753,"chars":147}],"text":"# AppSourceCop Error AS0032\nControls that have been published must not be deleted.\n## Description\nControls that have been published must not be deleted, because it will break dependent extensions.\n## Remarks\nRemoving a control which has been published is not allowed because it will break dependent extensions which are referencing or modifying it.\n> NOTE\n> Renaming a control will also trigger this error. AppSourceCop will consider the renamed control as a new control, unrelated to the one defined in the previous version.\n## How to fix this diagnostic?\nIf the control was removed, revert the change by adding back the control and mark it as ../properties/devenv-obsoletestate-property.\nIf the control was renamed to change its display string in the web client, consider using the ../properties/devenv-caption-property property instead.\nIf the control was renamed to comply with naming rules such as appsourcecop-as0011, consider obsoleting the control and introducing a new one.\n## Examples of errors for dependent extensions\nThe following examples show some of the compilation errors that will be reported on dependent extensions if a control is removed from one version to another.\nVersion 1.0 of the extension defines a page named MyPage that contains a control named MyControl. Version 2.0 does not define this control anymore.\n### Example 1 - Extensions modify this control\nIf a dependent extension modifies this control in a page extension or customization, when compiling against version 2.0, this will lead to a compilation error similar to `The control 'MyControl' is not found in the target 'MyPage' (AL0270)`.\n```al\npageextension 50100 SomePageExtension extends MyPage\n{\n    layout\n    {\n        modify(MyControl)\n        {\n            Visible = true;\n        }\n    }\n}\n```\n### Example 2 - Extensions referencing this control as an anchor for a change\nIf a dependent extension uses this control as an anchor for a change in a page extension or customization, when compiling against version 2.0, this will lead to a compilation error similar to `The control 'MyControl' is not found in the target 'MyPage' (AL0270)`.\n```al\npageextension 50100 SomePageExtension extends MyPage\n{\n    layout\n    {\n        addafter(MyControl)\n        {\n            field(SomeNewControl; 15)\n            {\n            }\n        }\n    }\n}\n```\n### Example 3 - Extensions moving this control\nIf a dependent extension is moving this control in a page extension or customization, when compiling against version 2.0, this will lead to a compilation error similar to `The control 'MyControl' is not found in the target 'MyPage' (AL0270)`.\n```al\npageextension 50100 SomePageExtension extends MyPage\n{\n    layout\n    {\n        movefirst(content; MyControl)\n    }\n}\n```\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}