When building extensions in Microsoft Dynamics 365 Business Central, managing object visibility is extremely important—especially as your extension grows across multiple modules or becomes part of an ISV solution.
Starting from runtime version 4.0, Microsoft introduced the Access property to allow developers to specify how accessible their objects should be within and outside their extension.
What is the Access Property?
The Access property defines who can use your AL object.
It determines whether:
-
Only your extension (module) can access the object
-
Other extensions can access it
-
Only the same table or its extension can access a field
-
Or whether it should remain fully public
The Access property applies to:
- Codeunit
- Query
- Table
- Table field
- Enum Type
- Interface
- Permission Set
Access Property Values for Codeunit, Table, Query, Enum, and Interface
When you use the Access property on objects such as codeunits, tables, queries, enums, or interfaces, you can control how these objects are exposed within Business Central. The property mainly supports two values:
Public — This means the object is fully accessible not only within your own extension (module) but also from any other extension that references it. Use this when you want to expose functionality or data as part of your public API for partner or third-party extensions.
Internal — This means the object can only be accessed by code inside your own extension. Other extensions cannot directly use or reference this object. This is useful when you want to hide internal logic, helper objects, or implementation details that should not be exposed externally.
Access Property Values for Table Fields
When defining table fields, the Access property provides additional levels of visibility that help control how the field can be used by other objects or modules.
Local — This makes the field accessible only within the same table where it is declared or within the table extension of that table. No other objects or modules can reference it. This is useful for technical or internal fields that should remain strictly private.
Protected — This allows the field to be accessed by the table itself and by any table extensions created for that table. It offers limited extensibility while still keeping the field hidden from external modules.
Public — This means the field is accessible to all modules and any code that references the table. Public fields can be used across extensions and are fully visible in Page Designer. This is also the default access level.
Internal — This restricts the field's accessibility to the same module. Other extensions cannot reference it directly, even if they extend the table. This is useful when you want to keep certain fields hidden from external apps but still available within your own extension.
Thanks For Reading...!!😊
Regards,
Khushbu Rajvi

Like
Report
*This post is locked for comments