{"title":"AppSourceCop Hidden AS0131","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0131/","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-as0131, 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-as0131","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 with schema should not be added.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Hidden AS0131","slug":"appsourcecop-hidden-as0131","at":0,"chars":2019},{"level":2,"title":"Description","slug":"description","at":69,"chars":55},{"level":2,"title":"Remarks","slug":"remarks","at":124,"chars":93},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":217,"chars":121},{"level":2,"title":"Examples triggering this rule","slug":"examples-triggering-this-rule","at":338,"chars":666},{"level":3,"title":"Example 1 - Adding a table with schema","slug":"example-1---adding-a-table-with-schema","at":371,"chars":277},{"level":3,"title":"Example 2 - Adding a table extension contributing to the table schema","slug":"example-2---adding-a-table-extension-contributing-to-the-table-schema","at":648,"chars":356},{"level":2,"title":"Examples not triggering this rule","slug":"examples-not-triggering-this-rule","at":1004,"chars":864},{"level":3,"title":"Example 1 - Adding a table without schema","slug":"example-1---adding-a-table-without-schema","at":1041,"chars":312},{"level":3,"title":"Example 2 - Adding a table extension not contributing to the table schema","slug":"example-2---adding-a-table-extension-not-contributing-to-the-table-schema","at":1353,"chars":515},{"level":2,"title":"Related information","slug":"related-information","at":1868,"chars":151}],"text":"# AppSourceCop Hidden AS0131\nTables with schema should not be added.\n## Description\nTables with schema should not be added.\n## Remarks\nThis rule is not enabled by default since additive changes are generally allowed.\n## How to fix this diagnostic?\nRevert the changes done by removing the tables and table extensions that have been added.\n## Examples triggering this rule\n### Example 1 - Adding a table with schema\nVersion 1 of the extension\n```al\n// No table named MyTable\n```\nVersion 2 of the extension\n```al\ntable 50100 MyTable\n{\n    // By default, the table is of type Normal\n\n    fields\n    {\n        field(1; MyField; Integer) { }\n    }\n}\n```\n### Example 2 - Adding a table extension contributing to the table schema\nVersion 1 of the extension\n```al\n// No table extension for the table SomeTable\n```\nVersion 2 of the extension\n```al\ntableextension 50100 MyExtension extends SomeTable\n{\n    fields\n    {\n        field(50100; MyExtField; Integer) { } // Adding a new table extension field\n    }\n}\n```\n## Examples not triggering this rule\n### Example 1 - Adding a table without schema\nVersion 1 of the extension\n```al\n// No table named MyTable\n```\nVersion 2 of the extension\n```al\ntable 50100 MyTable\n{\n    TableType = Temporary; // Temporary tables don't contribute to the schema.\n\n    fields\n    {\n        field(1; MyField; Integer) { }\n    }\n}\n```\n### Example 2 - Adding a table extension not contributing to the table schema\nVersion 1 of the extension\n```al\n// No table extension for the table SomeTable\n```\nVersion 2 of the extension\n```al\ntableextension 50100 MyExtension extends SomeTable\n{\n    fields\n    {\n        field(50100; MyFlowField; Integer)\n        {\n            FieldClass = FlowField; // FlowFields don't contribute to the schema.\n        }\n    }\n\n    procedure MyProcedure() // Procedures don't contribute to the schema.\n    begin\n    end;\n}\n```\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGetting Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}