Creating the new tables

As our first step, we need to create the two new tables that we need to add to Dynamics 365 Business Central in order to satisfy our requirements.

To create a new table, we add a file under the Src\CustomerCategory\table folder called Tab50100.CustomerCategory.al, and in this file we create the definition for the Customer Category table by using the ttable AL snippet:

The snippet adds a skeleton to create a table. Here, you need to set the object ID, the object name, and define the fields of your tables and keys.

Our Customer Category table will be defined as follows:

Here is the complete AL code:

table 50100 "Customer ...

Get Dynamics 365 Business Central Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.