{"title":"CodeCop Warning AA0240","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/codecop-aa0240/","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-aa0240, 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-aa0240","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":"Email and Phone No must not be present in any part of the source code that might be collected as telemetry data.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"CodeCop Warning AA0240","slug":"codecop-warning-aa0240","at":0,"chars":1241},{"level":2,"title":"Description","slug":"description","at":96,"chars":128},{"level":2,"title":"Reason for the rule","slug":"reason-for-the-rule","at":224,"chars":190},{"level":2,"title":"Bad code example","slug":"bad-code-example","at":414,"chars":165},{"level":2,"title":"Good code example","slug":"good-code-example","at":579,"chars":149},{"level":2,"title":"Remarks","slug":"remarks","at":728,"chars":376},{"level":2,"title":"Related information","slug":"related-information","at":1104,"chars":137}],"text":"# CodeCop Warning AA0240\nEmail and Phone No must not be present in any part of the source code.\n## Description\nEmail and Phone No must not be present in any part of the source code that might be collected as telemetry data.\n## Reason for the rule\nTo prevent exposing personal data, make sure that Email or Phone No information is not available in the source code because that might be collected as telemetry data.\n## Bad code example\n```al\ntable 18 Customer\n{\n   ...\n   fields\n   {\n      field(1; Email; Text[50]){ CaptionML = ENU = 'john.smith@contoso.com'; }\n   }\n   ...\n}\n```\n## Good code example\n```al\ntable 18 Customer\n{\n   ...\n   fields\n   {\n      field(1; Email; Text[50]){ CaptionML = ENU = 'Email'; }\n   }\n   ...\n}\n```\n## Remarks\nThe following elements are checked in code:\n Object names\n Table captions\n Table field names\n Table field captions\n Page captions\n Page field names\n Page field captions\n Page field tooltips\n Value of labels (in declaration)\n Value of text constants\n Translation files (tags `<source>`, `<target>`, `<note>`)\n App manifest file (Name, Brief, Description, Publisher)\n## Related information\nCodeCop Analyzer<codecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}