{"title":"CodeCop Hidden AA0241","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/codecop-aa0241/","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/codecop-aa0241, 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/codecop-aa0241","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":"Use all lowercase letters for reserved language keywords.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"CodeCop Hidden AA0241","slug":"codecop-hidden-aa0241","at":0,"chars":1440},{"level":2,"title":"Description","slug":"description","at":82,"chars":169},{"level":2,"title":"Remarks","slug":"remarks","at":251,"chars":335},{"level":2,"title":"Bad code example","slug":"bad-code-example","at":586,"chars":244},{"level":2,"title":"Good code example","slug":"good-code-example","at":830,"chars":291},{"level":2,"title":"Good and bad practices for fixing the rule","slug":"good-and-bad-practices-for-fixing-the-rule","at":1121,"chars":182},{"level":2,"title":"Related information","slug":"related-information","at":1303,"chars":137}],"text":"# CodeCop Hidden AA0241\nUse all lowercase letters for reserved language keywords.\n## Description\nUse all lowercase letters for reserved language keywords. This rule does not apply to built-in methods and types; they must be written using Pascal case.\n## Remarks\nWe recommend following these best practices when developing extensions in AL to ensure consistency and discoverability on file, object, and method naming, as well as better readability of written code.\nData types in variable and parameter declarations aren't included in this rule because they're written using Pascal case.\n## Bad code example\n```al\ntrigger OnValidate()\nBEGIN\n    IF \"Order Date\" > \"Starting Date\" THEN\n       Error(Text007, FieldCaption(\"Order Date\"), FieldCaption(\"Starting Date\"));\nEND;\n\nVAR\n    Text007: Label '%1 cannot be greater than %2.';\n```\n## Good code example\n```al\ntrigger OnValidate()\nbegin\n    if \"Order Date\" > \"Starting Date\" then\n       error(Text007, FieldCaption(\"Order Date\"), FieldCaption(\"Starting Date\"));\nend;\n\nvar\n    Text007: Label '%1 cannot be greater than %2.'; // Label variable declaration in Pascal case\n\n```\n## Good and bad practices for fixing the rule\nChange every reserved language keyword to use lowercase letters. Use Pascal case for data types in variable and parameter declarations.\n## Related information\nCodeCop Analyzer<codecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}