{"title":"Access Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-access-property/","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/properties/devenv-access-property, 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/properties/devenv-access-property","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":"Sets the object accessibility level, which controls whether the object can be used from other code in your module or other modules.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":192,"chars":89},{"level":2,"title":"Property value","slug":"property-value","at":281,"chars":929},{"level":3,"title":"Table field level","slug":"table-field-level","at":593,"chars":617},{"level":2,"title":"Syntax","slug":"syntax","at":1210,"chars":554},{"level":3,"title":"Tables","slug":"tables","at":1220,"chars":117},{"level":3,"title":"Table fields","slug":"table-fields","at":1337,"chars":244},{"level":3,"title":"Queries","slug":"queries","at":1581,"chars":99},{"level":3,"title":"Codeunits","slug":"codeunits","at":1680,"chars":84},{"level":2,"title":"Remarks","slug":"remarks","at":1764,"chars":839},{"level":2,"title":"Related information","slug":"related-information","at":2603,"chars":97}],"text":"> Version: _Available or changed with runtime version 4.0._\nSets the object accessibility level, which controls whether the object can be used from other code in your module or other modules.\n## Applies to\n Codeunit\n Query\n Table\n Table field\n Enum Type\n Interface\n Permission Set\n## Property value\nValue|Available or changed with|Description\nPublic|runtime version 4.0|The object can be accessed by any other code in the same module and in other modules that references it.\nInternal|runtime version 4.0|The object can be accessed only by code in the same module, but not from another module.\n### Table field level\nFor table fields there are two additional settings for Access and you have the following settings available:\nAccess modifier|Level of accessibility\nLocal|The field can be accessed only by code in the same table or table extension where the field is defined.\nProtected|The field can be accessed only by code in the same table or table extensions of that table.\nPublic|The object can be accessed by any other code in the same module and in other modules that references it. It is the default value.\nInternal|The object can be accessed only by code in the same module, but not from another module.\n## Syntax\n### Tables\n```al\ntable 50111 MyTable\n{\n    DataClassification = CustomerContent;\n    Access = Internal;\n    ...\n\n```\n### Table fields\n```al\ntable 50111 MyTable\n{\n    DataClassification = CustomerContent;\n\n    fields\n    {\n        field(1;MyField; Integer)\n        {\n            DataClassification = CustomerContent;\n            Access = Protected;\n    ...\n\n```\n### Queries\n```al\nquery 50114 MyQuery\n{\n    QueryType = Normal;\n    Access = Internal;\n    ...\n```\n### Codeunits\n```al\ncodeunit 50113 MyCodeunit\n{\n    Access = Internal;\n    ...\n\n```\n## Remarks\n> IMPORTANT\n> This property is only taken into consideration at compile time. For example, at compile time, a table with `Access = Internal` cannot be used from other modules that do not have access to the internals of the module where the table is defined, but at runtime, any module can access the table by using reflection-based mechanisms such as RecordRef, or TransferFields. And the OnRun trigger can be run on internal codeunits by using Codeunit.Run. Setting the object accessibility level as `Access = Internal;` cannot be used as a security boundary. Also see ../devenv-json-files#appjson-file.\n> NOTE\n> The accessibility of tables and table fields is taken into account when using ../devenv-inclient-designer. As a consequence, only table fields which have their accessibility set to Public can be added to the page.\n## Related information\ndevenv-properties\ndevenv-extensible-property\n../devenv-protected-variables"}