topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Defining table structures

Defining table structures in AL covers how to build Business Central tables: the table object, fields, keys, triggers, system fields, table extensions, relationships, tooltips, and optimized text search. It answers questions about syntax, properties, and extensibility of tables.

Path: Development > Programming in the AL language > Tables and data > Defining table structures · tier official · system development · narrative reviewed (checked by Opus)

Overview

Tables are the fundamental database objects in Business Central. A table has data and a description made up of fields, keys, properties, and triggers. The pages in this section describe each part of that structure, from general concepts to specific properties.

Start with Tables overview for the concepts, then read Table object for syntax, limitations, and extensibility rules. Setting Relationships Between Tables explains the TableRelation property for one-to-many, many-to-many, and one-to-one relations, including conditional relations and filters. Table extension object shows how to add fields, keys, and trigger code without changing the base table.

Smaller pages cover specific topics: system fields that every table gets automatically, tooltips on table and page fields, and the OptimizeForTextSearch property for full-text search on character fields.

Key points

  • Tables consist of table data and a table description with fields, keys, properties, and triggers.
  • TableRelation defines one-to-many, many-to-many, and one-to-one relationships, with conditions and table filters, for validation and lookups.
  • Table extensions add fields, keys, and trigger code without modifying the base table; the Extensible property controls extensibility.
  • Every table gets system fields automatically: SystemId for unique record identification, audit fields (SystemCreatedAt, SystemCreatedBy, SystemModifiedAt, SystemModifiedBy), and SystemRowVersion for synchronization.
  • Tooltips set on table fields are inherited by pages starting in 2024 release wave 1, and page fields can override them; CodeCop rule AA0234 applies.
  • OptimizeForTextSearch uses full-text search in SQL Server and Azure SQL Database for efficient, case- and accent-insensitive searching on character data.
  • The Table object page covers InitValue, OnValidate, and Integer to BigInteger migration, and mentions 2024 release wave 1, 2024 release wave 2, and 2026 release wave 2.

Learn pages

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 7 Learn pages