{"title":"AppSourceCop Error AS0001","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0001/","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-as0001, 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-as0001","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":"Tables and table extensions that have been published must not be deleted.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0001","slug":"appsourcecop-error-as0001","at":0,"chars":2820},{"level":2,"title":"Description","slug":"description","at":102,"chars":170},{"level":2,"title":"Remarks","slug":"remarks","at":272,"chars":863},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":1135,"chars":126},{"level":2,"title":"Examples not triggering this rule","slug":"examples-not-triggering-this-rule","at":1261,"chars":1412},{"level":3,"title":"Example 1 - Removing a table extension on a Microsoft table which is obsolete removed","slug":"example-1---removing-a-table-extension-on-a-microsoft-table-which-is-obsolete-removed","at":1298,"chars":479},{"level":3,"title":"Example 2 - Targeting runtime less than 13.0","slug":"example-2---targeting-runtime-less-than-130","at":1777,"chars":896},{"level":2,"title":"Related information","slug":"related-information","at":2673,"chars":147}],"text":"# AppSourceCop Error AS0001\nTables and table extensions that have been published must not be deleted.\n## Description\nTables and table extensions that have been published must not be deleted. This might break the upgrade of existing installations and dependent extensions.\n## Remarks\nThis rule validates tables independently of their Accessibility or ObsoleteState, because tables are always used when synchronizing the schema defined in the extension to the database.\nThis rule validates table extensions independently of the ObsoleteState of their target tables. Table extensions that extend a table, which is marked with obsolete state Removed must be preserved, since they're still contributing to the database schema defined by the extension. Only if the target table of an extension has been deleted, then the table extension can be deleted as well.\nThere's an exception for table extensions that target Microsoft tables, which have either been deleted or marked with `ObsoleteState = Removed`. In this case, it's possible to remove the table extensions as long as the extension requires a runtime with version '13.0' and higher.\n## How to fix this diagnostic?\nRevert the changes done by adding back the tables and table extensions that have been removed.\n## Examples not triggering this rule\n### Example 1 - Removing a table extension on a Microsoft table which is obsolete removed\nVersion 1 of the extension\n```al\n// The target table is removed from Business Central 15.0 and later\ntableextension 50100 MyExtension extends \"Bank Data Conversion Pmt. Type\"\n{\n    fields\n    {\n        field(50100; \"MyField\"; Code[20])\n        {\n            DataClassification = CustomerContent;\n        }\n    }\n}\n```\nVersion 2 of the extension\n```al\n// The table extension is removed\n```\n### Example 2 - Targeting runtime less than 13.0\nVersion 1 of the extension\n```al\n// The target table is removed from Business Central 15.0 and later\ntableextension 50100 MyExtension extends \"Bank Data Conversion Pmt. Type\"\n{\n    fields\n    {\n        field(50100; \"MyField\"; Code[20])\n        {\n            DataClassification = CustomerContent;\n        }\n    }\n}\n```\nThe app.json file\n```json\n{\n    \"runtime\": \"12.0\"\n}\n```\nIn this case, it's not possible to just remove the table extension. A new version of the application, which targets runtime 13.0, must be created.\nVersion 2 of the extension\n```al\n// table extension is removed\n```\nThe app.json file\n```json\n{\n    \"runtime\": \"13.0\",\n    \"application\": \"24.0.0.0\" // or higher\n}\n```\nThen for compatibility with the older runtime, hotfixes must be used for the previous version of the application, which is compatible with the older runtimes.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}