The difference between Table Data and Table in permissions.
If you have worked with NAV before, you might already know about this. However, if you’re new to Business Central as a consultant or developer, you might find it a bit confusing. Why are there both Table Data and Table in the Object Type, and what’s the difference between them?
Difference
In Business Central, the terms “Table” and “Table Data” refer to two different aspects related to how data is structured and stored:
- Table: This is the schema or structure definition of the data. It defines the columns, data types, and relationships between tables. Think of it as the blueprint for the data. A table specifies how data should be organized, but it doesn’t contain the actual data itself.
- Table Data: This is the actual content or data stored in the table. It refers to the records or entries within a table that follow the defined schema.
Example
Table Definition:
Let’s say you have a table called Customer with the following structure:
- Customer ID: Integer
- Name: Text
- Email: Text
- Phone: Text
This defines how customer data should be stored but doesn’t include any actual customer information.
Table Data:
Once you populate this table, it might look like:
Here, the entries (John Doe, Jane Smith, etc.) are the table data, following the structure defined by the table.
Permissions
In Business Central, permissions for tables and table data are handled differently, reflecting their distinct roles:
- Table Permissions: These control access to the table schema or structure itself. Permissions on tables determine who can view, modify, or delete the table definition. This includes creating or altering the table structure, such as adding or removing fields, changing data types, or modifying relationships.
- Table Data Permissions: These govern access to the actual data within the table. Permissions on table data specify who can read, insert, modify, or delete the records stored in a table.
Example Scenario
Imagine a Customer table:
- Table Permissions might be granted to developers or administrators who need to define or alter the structure of the Customer table, such as adding new fields like “Address” or “Date of Birth.”
- Table Data Permissions would typically be assigned to users or roles that interact with customer records. For instance, sales representatives might have permissions to read and insert customer data, but not modify or delete it, while managers might have broader permissions.
Core Points
- But if you want users to access data on the UI, you need to set at least add the Execute permission of Page, Table object and the Read permission of Table Data. Otherwise users will not be able to search and open the page.
- If Table and Table Data are missing one, the page cannot be opened in the UI.
- If you don’t need to access the data in the table, you just need to execute the function in the table, then you only need to add the Table permission.
- If you only need to access the data in the table, you only need to add the Table Data.
- If the user do not have Table Data permissions, the following error will be prompted.
I hope you find this article helpful.
Best Regards,
Ahmad Subhani
D365 Business Central Functional Consultant
MB-800 Certified
Email: ahmadsubhani424@gmail.com
WhatsApp: +923357687164
