{"title":"CodeCop Warning AA0244","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/codecop-aa0244/","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-aa0244, 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-aa0244","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":"Do not use identical names for parameters and global variables.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"CodeCop Warning AA0244","slug":"codecop-warning-aa0244","at":0,"chars":1266},{"level":2,"title":"Description","slug":"description","at":89,"chars":79},{"level":2,"title":"Remarks","slug":"remarks","at":168,"chars":346},{"level":2,"title":"No warning","slug":"no-warning","at":514,"chars":213},{"level":2,"title":"Warning","slug":"warning","at":727,"chars":398},{"level":2,"title":"Related information","slug":"related-information","at":1125,"chars":141}],"text":"# CodeCop Warning AA0244\nDo not use identical names for parameters and global variables.\n## Description\nDo not use identical names for parameters and global variables.\n## Remarks\nThis CodeCop rule is similar to codecop-aa0198, but it applies to method parameters. The rule warns when a method's parameters names collide with global variable names, but with the following specifics for Event declaration.\nAA0244 doesn't warn on Events with the exception of Integration Events that have GlobalVarAccess set to true.\n## No warning\n```al\ncodeunit 50100 MyCodeunit\n{\n    // GlobalVarAccess = false hence we don't warn\n    [IntegrationEvent(true, false)]\n    local procedure MyNewEvent(EventParamA: Integer)\n    begin\n    end;\n}\n```\n## Warning\n```al\ncodeunit 50100 MyCodeunit\n{\n    // GlobalVarAccess = true hence we warn\n    [IntegrationEvent(true, true)]\n    local procedure MyNewEvent(EventParamA: Integer)\n    begin\n    end;\n}\n```\n> NOTE\n> Rule AA0244 warns on EventSubscribers and even if the subscribers don't have control over the names of the parameters, they have control over the global variables living in the Codeunit.\n## Related information\nCodeCop Analyzer<codecop>\nGetting Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}