In this blog post, we will be addressing some of the Table properties in Microsoft Business Central. Prerequisites for this post are VS Code, AL Language Extension, and Business Central.
Properties:
CharAllowed
- It sets which characters are allowed in the field.
- This property can be applied to Table and Page fields.
- CharAllowed takes parameters in a combination of two characters as shown below, where characters “1 to 4,“ “7 to 9,” and “a to d” are allowed.
- An example of this property is given below.
|
Definition |
|
Error |
DataPerCompany
- It sets whether the table data applies to all companies in the database or only the current company.
- The default value for this property is true.
- This property can only be applied to Tables.
- The User table is an example where DataPerCompany is false.
DataCaptionFields
- Sets fields defined on the top-left position of the Card page.
- It can be applied in Tables.
- Syntax: DataCaptionFields = Field1, Field2, Field3;
- In below example, we used No, Name and Type fields for Caption.
|
Definition |
|
|
Result |
|
Enabled
- Sets a value that indicates whether a field is enabled or disabled.
- It can be applied to Page fields, Table fields, and Actions.
- In the below example, we set Enabled Property to True on Name field, therefore Name is field is visible to users but it is not editable and it is displayed Gray in color, making it less highlighted than other fields.
|
Enable = False |
Hope this helps!