topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Tables and data

Tables and data in AL covers how to define tables, read and modify records, use queries, FlowFields and FlowFilters, indexing (SIFT and NCCI), streaming data, and XMLport import and export, and Excel export. It also covers number sequences and the DataTransfer type. It answers syntax, performance and how-to questions about working with Business Central data.

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

Overview

This section groups everything an AL developer needs to define, store, retrieve and move data in Business Central. The first three subtopics are about defining, changing and reading data. Defining table structures covers objects, fields, keys, triggers and table extensions. Modifying data covers Insert, Modify, Delete, and temporary and virtual tables. Reading data covers Get, Find, FindSet, partial records, isolation levels and read scale-out.

Further subtopics cover Query objects for joins and aggregation, FlowFields and FlowFilters for calculated values that are not stored, and indexing for performance with SIFT and Nonclustered Columnstore Indexes. There is also a Streaming data subtopic. The import and export subtopic covers XMLports and exporting to Excel with the Excel Buffer table, for moving data between Business Central and external sources.

Two pages sit directly in this section. Number sequences use SQL Server sequences to generate numeric identifiers. They allow gaps and do not block, and the page contrasts them with number series for better performance where numbering does not need to be continuous. DataTransfer bulk-copies data between SQL-based tables during upgrade and install, and is much faster than row-by-row record operations. Start with Defining table structures, then Reading data and Modifying data. Go to the indexing pages when you tune performance.

Key points

  • Defining table structures covers table objects, fields, keys, triggers, system fields, table extensions, relationships, tooltips and optimized text search.
  • Modifying data covers Insert, Modify and Delete, temporary and virtual tables, filter pages, media on records, Dataverse table properties and keeping test data between extension publishes.
  • Reading data covers Get, Find, FindSet and Next, partial records, record isolation levels, SQL performance of database methods and read scale-out.
  • Query objects define dataitems and columns, link and join tables, filter, aggregate, extract date parts, and can be read in code or analyzed interactively.
  • FlowFields are virtual fields calculated through CalcFormula without storing data. FlowFilters limit those calculations at runtime.
  • Indexing covers SIFT for fast sums on numeric columns, SIFT maintenance costs, NCCI evaluation and tuning, tracing in SQL Server, and migrating from SIFT to NCCI.
  • Number sequences use the NumberSequence data type (Insert, Delete, Next, Current, Exists) backed by SQL Server sequences. They allow gaps and do not block, and the page contrasts them with number series for performance in non-continuous numbering.
  • DataTransfer bulk-copies data between SQL-based tables during upgrade and install, using CopyRows, CopyFields, SetTables, AddFieldValue, AddConstantValue and AddJoin. It is much faster than row-by-row record operations. The page lists 2022 release wave 2.

Subtopics

More 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.

Business Central pages and reports

The pages, reports and queries this hub’s Learn pages name (ms.search.form, API reference), joined to the code by exact object id (data/index/docs-objects.json); a page shows the table it runs on.

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

What Learn documents here 8 of 56 Learn pages

Show 32 more