Data Mirroring is a generic mechanism that keeps two or more Business Central tables automatically synchronized, record for record. Once a mirror is set up between tables, any insert, change, deletion or rename of a record in one of the mirrored tables is automatically copied to the matching record in every other active table of the same mirror.
Mirror Definitions
A Mirrored Table header record represents one mirror definition.
Field
Description
Mirror Entry No.
Automatically assigned number identifying the mirror definition.
Description
A free-text description of what the mirror is used for.
Active
Whether the mirror definition is active.
Tables
Read-only list of the table IDs that currently participate in this mirror, maintained automatically.
Actions
Tables
Opens the list of tables that participate in this mirror (see below).
Participating Tables
Each mirror definition has one line per table that takes part in it - Table ID, Table Name and Active. A table can only participate in one mirror definition at a time; trying to add it to a second mirror results in an error.
For each table, use the Fields action to open the field mapping for that table (see below).
Field Mapping
For every participating table, the Mirrored Fields list defines exactly which fields are mirrored and in what order: Field ID, Field Name (looked up automatically) and Sorting Order.
Important
Fields are matched between the participating tables purely by their Sorting Order position - the first mirrored field of table A is mapped to the first mirrored field of table B, the second to the second, and so on. All tables in the same mirror must therefore define the same number of mirrored fields, in the same order, with matching field types; otherwise mirroring stops with an error.
The Edit Fields action opens a simple lookup listing a table's fields by number, name and type, so you can pick the field to add without having to know its field number by heart.
How Mirroring Runs
When a record in a mirrored table is inserted, modified, deleted or renamed, Construction Base finds every other active table in the same mirror definition and applies the same change to its matching record, found via the mapped primary key fields:
Insert - the matching record is created in the other table(s) if it doesn't exist yet.
Modify - the matching record is created if missing, otherwise its mapped fields are updated.
Delete - the matching record is deleted, if found.
Rename - the matching record's key is renamed accordingly.
Note
Data Mirroring is a technical building block used internally by other parts of Construction Base to keep related tables in sync - for example to keep a secondary or mobile copy of data consistent with its source table - rather than a feature you interact with directly on a daily basis.