{"title":"AppSourceCop Error AS0036","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0036/","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-as0036, 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-as0036","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":"Modifying table field properties can lead to destructive changes that will break the upgrade of existing installations and dependent extensions.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0036","slug":"appsourcecop-error-as0036","at":0,"chars":5071},{"level":2,"title":"Description","slug":"description","at":68,"chars":344},{"level":2,"title":"Code examples triggering the rule","slug":"code-examples-triggering-the-rule","at":412,"chars":2368},{"level":3,"title":"Example 1 - Changing Enabled from true to false","slug":"example-1---changing-enabled-from-true-to-false","at":449,"chars":647},{"level":3,"title":"Example 2 - Changing FieldClass from Normal to FlowField","slug":"example-2---changing-fieldclass-from-normal-to-flowfield","at":1096,"chars":696},{"level":3,"title":"Example 3 - Changing the Access property to make a field less accessible","slug":"example-3---changing-the-access-property-to-make-a-field-less-accessible","at":1792,"chars":988},{"level":2,"title":"Code examples not triggering the rule","slug":"code-examples-not-triggering-the-rule","at":2780,"chars":2144},{"level":3,"title":"Example 1 - Setting Enabled from false to true","slug":"example-1---setting-enabled-from-false-to-true","at":2821,"chars":675},{"level":3,"title":"Example 2 - Changing FieldClass from FlowField to Normal","slug":"example-2---changing-fieldclass-from-flowfield-to-normal","at":3496,"chars":781},{"level":3,"title":"Example 3 - Changing the Access property to make a field more accessible","slug":"example-3---changing-the-access-property-to-make-a-field-more-accessible","at":4277,"chars":647},{"level":2,"title":"Related information","slug":"related-information","at":4924,"chars":147}],"text":"# AppSourceCop Error AS0036\nUnsupported table field property change\n## Description\nModifying table field properties can lead to destructive changes that will break the upgrade of existing installations and dependent extensions.\nIt's not allowed to change property values in a way that would prevent the schema synchronization of the extension on existing installations, or that would break dependent extensions.\n## Code examples triggering the rule\n### Example 1 - Changing Enabled from true to false\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Enabled = true; // This is also the default value.\n        }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Enabled = false;\n        }\n    }\n}\n```\nIn version 2.0, the field is not enabled anymore. Disabled fields are not created in the database during schema synchronization. Disabling a field is then similar to removing the field and is then a destructive change.\n### Example 2 - Changing FieldClass from Normal to FlowField\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            FieldClass = Normal; // This is also the default value.\n        }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            FieldClass = FlowField;\n        }\n    }\n}\n```\nIn version 2.0, the field became a ../devenv-flowfields. As FlowFields are not physical fields that are stored in the database, they are not created during schema synchronization. Changing a Normal field to FlowField is a then destructive change.\n### Example 3 - Changing the Access property to make a field less accessible\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Access = Public; // This is also the default value.\n        }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Access = Local;\n        }\n    }\n}\n```\nIn version 2.0, the field MyField is now only accessible within MyTable and cannot be used from other extension. If a dependent extension references this field, this will lead to a compilation error similar to `'MyField' is inaccessible due to its protection level (AL0161)`.\nFor example, the following extension compiles when depending on version 1.0, but fails to compile with version 2.0:\n```al\ncodeunit 50120 AnotherCodeunit\n{\n    trigger OnRun()\n    var\n        r: Record MyTable;\n    begin\n        r.MyField := 1;\n    end;\n}\n```\n## Code examples not triggering the rule\n### Example 1 - Setting Enabled from false to true\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Enabled = false;\n        }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Enabled = true; // This is also the default value.\n        }\n    }\n}\n```\nIn version 2.0, the field is now enabled. Disabled fields are not created in the database during schema synchronization. For the schema synchronization, enabling a field is then similar to creating a new field and is then not a destructive change.\n### Example 2 - Changing FieldClass from FlowField to Normal\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            FieldClass = FlowField;\n        }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            FieldClass = Normal; // This is also the default value.\n        }\n    }\n}\n```\nIn version 2.0, the ../devenv-flowfields became a Normal field. As FlowFields are not physical fields that are stored in the database, they are not created during schema synchronization. For the schema synchronization, changing a flow field to a normal field is similar to creating a new field and is then not a destructive change.\n### Example 3 - Changing the Access property to make a field more accessible\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Access = Protected;\n        }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer)\n        {\n            Access = Public;\n        }\n    }\n}\n```\nIn version 1.0, MyField was accessible to table extensions extending MyTable. In version 2.0, it is now accessible to other extensions both in and outside of table extensions extending MyTable. This is not a breaking change.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}