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
- Defining table structures (7 pages)
- Modifying data (9 pages)
- Reading data (6 pages)
- Using Query objects (9 pages)
- FlowFields and FlowFilters (3 pages)
- Indexing data for performance (9 pages)
- Streaming data (5 pages)
- Importing and exporting data (6 pages)
More Learn pages
- Number sequences in Business Central: This article describes how to create and use number sequences in AL code in Dynamics 365 Business Central.
- Transferring data between tables using DataTransfer: Learn about the DataTransfer object type and how to use it to move data between tables.
Videos, posts and code changes
Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.
- #10255 Add expense activity history foundation (code change): “New append-only activity log table records expense report lifecycle events”
- #10486 [Quality Management] Use Bin code selection for transfer disposition in workflow response (code change): “The Quality Management transfer disposition now uses the bin”
- #13999 Intrastat export XML performance improvement (code change): “buffers Data Exch. Field rows in memory and reads from the temporary table instead of querying the database”
- #7938 Bugs/632378 make quality inspection gen rule warning actionable (code change): “making the Quality Management inspection generation rule warning actionable”
- #9168 [QM] Fix internal put-away from Quality Inspection sourcing wrong bin (code change): “Internal put-away disposition from Quality Inspection now resolves the source bin”
- #203 knowledge(data-modeling): Prices Including VAT decides the basis of sales/purchase/service line amounts (code change): “Prices Including VAT header flag affects the basis of line amount fields in sales, purchase, and service documents”
- #228 Knowledge: isolated events, FilterGroup scope, BLOB CalcFields and stream text encoding (code change): “Call CalcFields on a BLOB before reading its stream”
- How to Work with JSON in Business Central’s AL Code (community post): “working with JSON in Business Central AL involves understanding JSON structures; parse incoming JSON data”
- Importing Multi-Tab Excel Files into Business Central (community post): “Read each sheet independently using TempExcelBuffer OpenBookStream with the sheet name parameter”
- Importing XML into Business Central with AL (community post): “demonstrates how to parse cXML commerce eXtensible Markup Language files in Business Central using AL”
- Dynamics 365 Business Central: AL Query objects and the new ReadState property. (community post): “AL query objects now support the ReadState property in Dynamics 365 Business Central”
- Dynamics 365 Business Central: introducing the new “Recent Record” virtual table (community post): “new Recent Record virtual table that tracks records recently accessed”
- Record.IsDirty in Business Central 29: a worked example (community post): “Record.IsDirty() returns true when in-memory values differ”
- How to Group and Consolidate General Journal Lines Using Query Object in Business Central. (community post): “consolidate General Journal Lines in Business Central using Query Objects”
- BC Friday Tips #83 Check Whether a Record Has Changed (community post): “Record.IsDirty() method detects whether a record has been modified”
- Introducing AL Table Visualizer: An Interactive ER Diagram for Your Business Central Tables (community post): “generates interactive ER diagrams from Business Central table definitions”
- Dynamics 365 Business Central: Quickly get next Sequence/Entry Number (without using FindLast -> Entry No. + 1) (community post): “retrieve the next sequence or entry number for ledger tables in Business Central”
- Business Central 2025 wave 1 (BC26.2): Implicit conversion between Record and RecordRef (community post): “Record variables can now be directly assigned to RecordRef with implicit conversion”
- Dynamics 365 Business Central: How to quickly check if a field is a primary key field (community post): “how to check in AL whether a field belongs to a table’s primary key”
- Business Central 2026 release wave 2 (BC29): New “Recent Record” virtual table (2000000174) (community post): “Recent Record virtual table that tracks records most recently accessed”
- What’s New: Server and Database - A Faster Data Stack (2023 release wave 2) (video): “New companion table schema for table extensions”
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.
- Page 16 “Chart of Accounts” · on Table 15 “G/L Account” · via Using Query objects
- Page 22 “Customer List” · captioned “Customers” · on Table 18 “Customer” · via Using Query objects
- Page 25 “Customer Ledger Entries” · on Table 21 “Cust. Ledger Entry” · via Using Query objects
- Page 26 “Vendor Card” · on Table 23 “Vendor” · via Using Query objects
- Page 27 “Vendor List” · captioned “Vendors” · on Table 23 “Vendor” · via Using Query objects
- Page 31 “Item List” · captioned “Items” · on Table 27 “Item” · via Using Query objects
- Page 143 “Posted Sales Invoices” · on Table 112 “Sales Invoice Header” · via Using Query objects
- Page 144 “Posted Sales Credit Memos” · on Table 114 “Sales Cr.Memo Header” · via Using Query objects
- Page 456 “No. Series” · on Table 308 “No. Series” · via Using Query objects
- Page 457 “No. Series Lines” · on Table 309 “No. Series Line” · via Using Query objects
- Page 458 “No. Series Relationships” · on Table 310 “No. Series Relationship” · via Using Query objects
- Page 459 “Sales & Receivables Setup” · on Table 311 “Sales & Receivables Setup” · via Using Query objects
- Page 460 “Purchases & Payables Setup” · on Table 312 “Purchases & Payables Setup” · via Using Query objects
- Page 461 “Inventory Setup” · on Table 313 “Inventory Setup” · via Using Query objects
- Page 9300 “Sales Quotes” · on Table 36 “Sales Header” · via Using Query objects
- Page 9301 “Sales Invoice List” · captioned “Sales Invoices” · on Table 36 “Sales Header” · via Using Query objects
- Page 9303 “Blanket Sales Orders” · on Table 36 “Sales Header” · via Using Query objects
- Page 9304 “Sales Return Order List” · captioned “Sales Return Orders” · on Table 36 “Sales Header” · via Using Query objects
- Page 9305 “Sales Order List” · captioned “Sales Orders” · on Table 36 “Sales Header” · via Using Query objects
- Page 9306 “Purchase Quotes” · on Table 38 “Purchase Header” · via Using Query objects
- Page 9307 “Purchase Order List” · captioned “Purchase Orders” · on Table 38 “Purchase Header” · via Using Query objects
- Page 9309 “Purchase Credit Memos” · on Table 38 “Purchase Header” · via Using Query objects
- Page 9310 “Blanket Purchase Orders” · on Table 38 “Purchase Header” · via Using Query objects
- Page 9311 “Purchase Return Order List” · captioned “Purchase Return Orders” · on Table 38 “Purchase Header” · via Using Query objects
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 8 of 56 Learn pages
- learnAccessing Columns of a Query Dataset2024-04-29
- learnAdd Tooltips to Table and Page Fields2026-10-06
- learnAggregating data in query objects2024-05-03
- learnAL database methods and performance on SQL Server2025-04-01
- learnAnalyze list page and query data using data analysis2026-09-18
- learnCreating filter pages for filtering tables2023-03-31
- learnCreating FlowFields and FlowFilters2024-06-20
- learnData Item Links2021-04-01
Show 32 more
- learnDate virtual table2025-01-08
- learnDefining an XMLport Schema in AL2026-08-24
- learnEnable optimized text search on table fields2024-10-01
- learnEnabling Microsoft Dataverse Tables for Extension Development2021-04-01
- learnExporting data to Excel using ExcelBuffer2025-03-10
- learnFAQ for Partial Records2021-04-01
- learnFiltering in Query objects2024-06-20
- learnFlowFields overview2026-07-02
- learnFlowFilters overview2026-07-02
- learnGet, Find, and Next methods2025-05-26
- learnInsert, Modify, ModifyAll, Delete, and DeleteAll Methods2025-09-30
- learnInStream data type2026-10-01
- learnInteger virtual table2025-01-08
- learnMigrating from SIFT to Nonclustered Columnstore Indexes (NCCIs)2022-01-28
- learnNCCI Tuning and Tracing2022-01-28
- learnNonclustered Columnstore Indexes (NCCI)2022-01-28
- learnNonclustered Columnstore Indexes (NCCI) and Performance2026-11-30
- learnNonclustered Columnstore Indexes (NCCIs) and SQL Server2022-01-28
- learnNumber sequences in Business Central2023-11-21
- learnOutStream data type2026-10-01
- learnQuery object2024-11-22
- learnQuery Overview2021-04-01
- learnRecord instance isolation level2024-01-08
- learnRetrieving Date Data in Queries2025-09-30
- learnSetting Relationships Between Tables2021-04-01
- learnSIFT and SQL Server2021-04-01
- learnSIFT Index Performance and Maintenance2026-11-27
- learnSumIndexField Technology (SIFT)2021-04-01
- learnSynchronizing extension test data2021-08-26
- learnSystem.CopyStream(OutStream, InStream [, Integer]) Method2026-10-01
- learnTable extension object2024-04-17
- learnTable object2026-06-12