{"title":"AppSourceCop Error AS0005","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0005/","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-as0005, 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-as0005","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":"Fields must not change name; their names are case-sensitive.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0005","slug":"appsourcecop-error-as0005","at":0,"chars":1897},{"level":2,"title":"Description","slug":"description","at":56,"chars":157},{"level":2,"title":"Examples of non-valid name changes","slug":"examples-of-non-valid-name-changes","at":213,"chars":1537},{"level":3,"title":"Example 1 - Rename field","slug":"example-1---rename-field","at":251,"chars":349},{"level":3,"title":"Example 2 - Change casing","slug":"example-2---change-casing","at":600,"chars":345},{"level":3,"title":"Example 3 - Rename currently obsolete field","slug":"example-3---rename-currently-obsolete-field","at":945,"chars":805},{"level":2,"title":"Related information","slug":"related-information","at":1750,"chars":147}],"text":"# AppSourceCop Error AS0005\nFields must not change name\n## Description\nFields must not change name; their names are case-sensitive. This might break the upgrade of existing installations and dependent extensions.\n## Examples of non-valid name changes\n### Example 1 - Rename field\nVersion 1.0 of the app:\n```al\ntable 50 MyTable\n{\n    fields\n    {\n        field(1; Identifier; Integer) { }\n    }\n}\n```\nVersion 2.0 of the app:\n```al\ntable 50 MyTable\n{\n    fields\n    {\n        field(1; Id; Integer) { }\n    }\n}\n```\nThe field Identifier was renamed to Id, this is not allowed and will trigger this rule.\n### Example 2 - Change casing\nVersion 1.0 of the app:\n```al\ntable 50 MyTable\n{\n    fields\n    {\n        field(1; Id; Integer) { }\n    }\n}\n```\nVersion 2.0 of the app:\n```al\ntable 50 MyTable\n{\n    fields\n    {\n        field(1; ID; Integer) { }\n    }\n}\n```\nThe field Id had its casing changed to ID, this is not allowed and will trigger this rule.\n### Example 3 - Rename currently obsolete field\nVersion 1.0 of the app:\n```al\ntable 50 MyTable\n{\n    fields\n    {\n        field(10; \"Cust. Rep.\"; Text[40])\n        {\n            ObsoleteState = Pending;\n        }\n    }\n}\n```\nVersion 2.0 of the app:\n```al\ntable 50 MyTable\n{\n    fields\n    {\n        field(10; \"Alt. Name\"; Text[40])\n        {\n            ObsoleteState = Pending;\n        }\n    }\n}\n```\nThe field `Cust. Rep.` was renamed to `Alt. Name`. It is not allowed to change the name of a field if it is obsolete in both the previous and the new version, because the field is still part of the extension's API.\n> NOTE\n> This rule validates all fields independently of their Accessibility or ObsoleteState, because they are used when synchronizing the schema defined in the extension to the database.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}