{"title":"AppSourceCop Error AS0026","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0026/","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-as0026, 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-as0026","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":"The type and subtype of parameters cannot be modified in events and external procedures.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0026","slug":"appsourcecop-error-as0026","at":0,"chars":1774},{"level":2,"title":"Description","slug":"description","at":116,"chars":104},{"level":2,"title":"Remarks","slug":"remarks","at":220,"chars":244},{"level":2,"title":"Code examples triggering the rule","slug":"code-examples-triggering-the-rule","at":464,"chars":1163},{"level":3,"title":"Example 1 - Modifying parameters type","slug":"example-1---modifying-parameters-type","at":501,"chars":537},{"level":3,"title":"Example 2 - Modifying parameters subtype","slug":"example-2---modifying-parameters-subtype","at":1038,"chars":589},{"level":2,"title":"Related information","slug":"related-information","at":1627,"chars":147}],"text":"# AppSourceCop Error AS0026\nThe type and subtype of parameters cannot be modified in events and external procedures\n## Description\nThe type and subtype of parameters cannot be modified in events and external procedures.\n## Remarks\nIt's not allowed to change the type or subtype of parameters in public procedures as this will break dependent extensions which are calling them.\n> NOTE\n> This rule allows to convert Option type parameters into Enum type parameters.\n## Code examples triggering the rule\n### Example 1 - Modifying parameters type\nVersion 1.0 of the extension:\n```al\ncodeunit 50100 MyCodeunit\n{\n    procedure MyProcedure(i: Integer)\n    begin\n    end;\n}\n```\nVersion 2.0 of the extension:\n```al\ncodeunit 50100 MyCodeunit\n{\n    procedure MyProcedure(i: Boolean)\n    begin\n    end;\n}\n```\nIn version 2.0, the type of the parameter i has changed from Integer to Boolean. If a dependent extension calls this method, this will lead to a compilation error similar to `Argument 1: cannot convert from 'Integer' to 'Boolean' (AL0133)`.\n### Example 2 - Modifying parameters subtype\nVersion 1.0 of the extension:\n```al\ncodeunit 50100 MyCodeunit\n{\n    procedure MyProcedure(i: Record Customer)\n    begin\n    end;\n}\n```\nVersion 2.0 of the extension:\n```al\ncodeunit 50100 MyCodeunit\n{\n    procedure MyProcedure(i: Record Vendor)\n    begin\n    end;\n}\n```\nIn version 2.0, the subtype of the parameter i has changed from a Customer record to a Vendor record. If a dependent extension calls this method, this will lead to a compilation error similar to `Argument 1: cannot convert from 'Record Vendor' to 'Record Customer' (AL0133)`.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}