# Business Central Table Structure: Types, Keys and Relations

> Source: https://netray.co/tools/business-central-table-structure-types-and-relations-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Lookup of Business Central table types, primary and secondary keys, TableRelation, FlowFields, table number ranges and ways to find table information.

## Category

microsoft-dynamics

## Erp

Dynamics 365 Business Central

## Audience

- Business Central developer
- Functional consultant
- Power BI report writer

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Concept

**Key:** concept

**Type:** text

#### Group

**Key:** group

**Type:** select

**Options:**

- Table type
- Functional pattern
- Keys
- Relations
- Field type
- Where to look

#### What it means

**Key:** meaning

**Type:** text

#### Example or how to use it

**Key:** example

**Type:** text

**Rows:**

**Concept:** Normal table

**Group:** Table type

**Meaning:** Default table type. Stored in the Business Central database and shared by all users of the company.

**Example:** Table 18 Customer, Table 27 Item

**Concept:** Temporary table

**Group:** Table type

**Meaning:** A table variable or a table with the Temporary property. Lives in memory for the session and is not saved.

**Example:** Record Item temporary; used for buffers and report data

**Concept:** Virtual table

**Group:** Table type

**Meaning:** System-provided table that exposes metadata or runtime data rather than stored business data.

**Example:** Table Information, Field, Object Metadata style tables

**Concept:** System table

**Group:** Table type

**Meaning:** Platform tables in the 2,000,000,000 number range, such as users, companies and permissions.

**Example:** User, Company; read with care, not meant for customization

**Concept:** TableType property

**Group:** Table type

**Meaning:** AL property that marks a table as Normal, CRM, ExternalSQL, Exchange or MicrosoftGraph depending on where the data lives.

**Example:** TableType = CRM for Dataverse-backed tables

**Concept:** Master data table

**Group:** Functional pattern

**Meaning:** Long-lived business objects referenced by many documents.

**Example:** Customer, Vendor, Item, G/L Account, Resource

**Concept:** Setup table

**Group:** Functional pattern

**Meaning:** Single-record table with one row of company-wide configuration. Primary key is usually an empty code.

**Example:** Sales & Receivables Setup, Inventory Setup

**Concept:** Document header and line

**Group:** Functional pattern

**Meaning:** Open documents split into a header table and a line table linked by document type and number.

**Example:** Sales Header 36 and Sales Line 37, Purchase Header 38 and Purchase Line 39

**Concept:** Posted document tables

**Group:** Functional pattern

**Meaning:** Posting moves an open document into read-only posted header and line tables.

**Example:** Sales Invoice Header 112 and Sales Invoice Line 113

**Concept:** Ledger entry table

**Group:** Functional pattern

**Meaning:** Immutable transaction records written by posting. Identified by an Entry No. primary key.

**Example:** G/L Entry 17, Cust. Ledger Entry 21, Item Ledger Entry 32

**Concept:** Detailed ledger entry

**Group:** Functional pattern

**Meaning:** Child table that stores the application and adjustment movements behind a ledger entry.

**Example:** Detailed Cust. Ledg. Entry, Detailed Vendor Ledg. Entry

**Concept:** Journal line table

**Group:** Functional pattern

**Meaning:** Work-in-progress lines that become ledger entries when posted, grouped by template and batch.

**Example:** Gen. Journal Line, Item Journal Line

**Concept:** Register table

**Group:** Functional pattern

**Meaning:** Records the range of entry numbers created by each posting run.

**Example:** G/L Register 45

**Concept:** Primary key

**Group:** Keys

**Meaning:** First key listed in the AL keys section. Must be unique and cannot be removed.

**Example:** keys { key(PK; "No.") { Clustered = true; } }

**Concept:** Secondary key

**Group:** Keys

**Meaning:** Additional key used for sorting, filtering and performance. Each extra key costs write time and storage.

**Example:** Add a key only for a filter used often in lists or reports

**Concept:** SumIndexFields

**Group:** Keys

**Meaning:** Fields for which the server maintains running sums for a key, which makes FlowField sums fast on large ledgers.

**Example:** Key with SumIndexFields = Amount for a Sum FlowField

**Concept:** Clustered key

**Group:** Keys

**Meaning:** Determines physical row order in SQL Server. By default the primary key is clustered.

**Example:** Clustered = true on the primary key

**Concept:** TableRelation property

**Group:** Relations

**Meaning:** Field property that links a field to the primary key of another table, giving a lookup and referential check.

**Example:** TableRelation = Customer."No."

**Concept:** Conditional TableRelation

**Group:** Relations

**Meaning:** Relation that depends on another field using if, const, field and where.

**Example:** TableRelation = if (Type = const(Item)) Item else if (Type = const(Resource)) Resource

**Concept:** Filtered TableRelation

**Group:** Relations

**Meaning:** Adds a where clause so the lookup shows only related rows.

**Example:** TableRelation = "Ship-to Address".Code where ("Customer No." = field("Sell-to Customer No."))

**Concept:** ValidateTableRelation

**Group:** Relations

**Meaning:** Property that decides whether a typed value must exist in the related table.

**Example:** ValidateTableRelation = false allows free text with lookup

**Concept:** FlowField

**Group:** Field type

**Meaning:** Calculated field, not stored. Defined with CalcFormula using Sum, Count, Exist, Lookup, Average, Min or Max.

**Example:** Customer Balance as Sum of Detailed Cust. Ledg. Entry Amount

**Concept:** FlowFilter

**Group:** Field type

**Meaning:** Filter field that is not stored, used to restrict what a FlowField calculates.

**Example:** Date Filter on Customer or G/L Account

**Concept:** Normal field

**Group:** Field type

**Meaning:** Stored field with a data type such as Code, Text, Decimal, Date, Option or Enum.

**Example:** Field 2 Name in Customer

**Concept:** Table number ranges

**Group:** Where to look

**Meaning:** Standard base application objects use low numbers. Per-tenant extensions use 50000 to 99999. AppSource and partner apps use assigned ranges above that.

**Example:** Check app.json idRanges before adding an object

**Concept:** Table Information page

**Group:** Where to look

**Meaning:** Search for Table Information to see records and size per table in the current company.

**Example:** Find the largest tables before a performance review

**Concept:** Page Inspection

**Group:** Where to look

**Meaning:** Press Ctrl+Alt+F1 on a page to see its source table, each field name and its table field number.

**Example:** Identify the exact table and field behind a value on screen

**Concept:** Tell Me search

**Group:** Where to look

**Meaning:** Search for Tables, Fields or Table Information to browse objects and fields in the web client.

**Example:** Search 'Fields' and filter by table number

**Concept:** AL symbols and Go to definition

**Group:** Where to look

**Meaning:** In VS Code with the AL extension, download symbols and use Go to definition on a table name.

**Example:** Ctrl+click Customer to read the object source

**Notes:** Table names, numbers and properties can differ by release, and extensions can add fields and keys to standard tables. Confirm in your own environment with Page Inspection or the AL symbols before writing code or reports.

## Content

**Intro:** Business Central stores data in tables defined as AL objects. This reference lists the table types, the functional patterns you meet again and again, how keys and TableRelation work, and where to look up table information in your own system.

**Sections:**

#### How to use this reference

**Body:** Filter by group to see only table types, key concepts or relation rules, or type a word such as ledger, TableRelation or FlowField in the search box. The example column gives a standard table or a short AL snippet. Export the filtered list to Excel to share with a report writer or a new developer. For a list of core table numbers, open the Business Central core table numbers reference linked below; this page explains how those tables are structured rather than listing them.

#### Table types and functional patterns

**Body:** In AL, the TableType property says where data lives, but most conversations about types are really about patterns. Master data tables hold customers, vendors and items. Setup tables hold one row of configuration. Documents are split into a header and lines, and posting moves them to posted document tables. Ledger entries are the immutable result of posting, and detailed ledger entries store applications between them. Knowing the pattern tells you where a number came from and where not to write directly.

#### Keys, TableRelation and FlowFields

**Body:** Every table has a primary key; other keys speed up sorting and filtering at a write cost. TableRelation links a field to the primary key of another table and drives lookups and validation. Conditional relations use if and const to switch table by another field, and where clauses filter the lookup. FlowFields calculate sums, counts or lookups on demand, and are only fast when a matching key with SumIndexFields exists. Keep these in mind when a list page loads slowly.

**Bullets:**

- Relations point to a primary key, not to any field
- FlowFields are not stored, so they cannot be used in SQL joins directly
- Extra keys add write cost, so add them for proven needs

#### Finding table information in your system

**Body:** Use Page Inspection (Ctrl+Alt+F1) to see which table and field sit behind a value on screen. Search for Table Information to view row counts and size per table. In VS Code with the AL Language extension, download symbols and go to a table definition to read its fields, keys and relations. For reporting, remember that extension fields live in separate extension tables on the SQL side, and that web service and API pages are the supported way to read data, not direct SQL on SaaS.

**Cta:** If your team wants to ask Business Central questions in plain language against its own tables, Netray can add a private AI layer that respects permissions. This reference does not need it.

**Faq:**

#### What types of tables are in Business Central?

**Answer:** Technically TableType can be Normal, CRM, ExternalSQL, Exchange or MicrosoftGraph, and tables can be temporary. Functionally you will see master, setup, document header and line, posted document, ledger entry, journal and register tables.

#### How does TableRelation work in Business Central?

**Answer:** TableRelation is a field property that points to the primary key of another table. It drives the lookup list and, unless ValidateTableRelation is false, checks that the value exists. It can be conditional with if and const, and filtered with where.

#### How do I find which table a field belongs to?

**Answer:** Open the page, press Ctrl+Alt+F1 for Page Inspection, and select the field. It shows the source table, field name and number. In VS Code, download symbols and use Go to definition on the table name.

#### Why are some Business Central values not in the SQL table?

**Answer:** FlowFields are calculated and not stored. Also, fields added by extensions are stored in separate extension tables joined by the primary key, so a query against the base table alone will not return them.

## Search terms

business central table structure, business central table information, business central table relation, types of tables in business central, tablerelation al business central, business central master ledger entry tables, business central flowfield calcformula, business central table number ranges

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
