---
id: object/table/1224
type: object
title: Table 1224 "Data Exch. Mapping"
summary: Table 1224 "Data Exch. Mapping" in Base Application (System.IO). 12 fields, 5 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "24"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: a06aeb27a7fd7242a8f6be60afaf16767075d9330c1255edd03ffef98de9f44f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/DataExchange/DataExchMapping.Table.al
    title: src/Layers/W1/BaseApp/System/DataExchange/DataExchMapping.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/across-how-to-set-up-data-exchange-definitions
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/general-business-functionality/exchange-data-electronically/exchange-data
  localizations:
    - localization/ca
    - localization/mx
    - localization/us
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 1224
name: Data Exch. Mapping
namespace: System.IO
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
source_major: "29"
obsolete: null
countries:
  - ca
  - mx
  - us
ms_search_form_ids: []
counts:
  fields: 12
  procedures: 8
  events: 1
  subscribers: 0
relations:
  out: 2
  referenced_by: 2
  pages: 2
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 1224 "Data Exch. Mapping"

> Table 1224 "Data Exch. Mapping" in Base Application (System.IO). 12 fields, 5 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24.

Base Application · System.IO · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/DataExchange/DataExchMapping.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 1214 "Data Exch Mapping Card"](../page/1214.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Data Exch. Mapping |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Data Exch. Def Code | Code[20] | — | TableRelation [Table 1222 "Data Exch. Def"](../table/1222.md) (Data Exch. Def); NotBlank |
| 2 | Table ID | Integer | Specifies the table that holds the fields to or from which data is exchanged according to the mapping. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation AllObjWithCaption."Object ID" where("Object Type" = const(Table)); NotBlank |
| 3 | Name | Text[250] | Specifies the name of the data exchange mapping setup. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> |  |
| 4 | Mapping Codeunit | Integer | Specifies the codeunit that is used to map the specified columns or XML data elements to fields in Microsoft Dynamics 365. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation AllObjWithCaption."Object ID" where("Object Type" = const(Codeunit)) |
| 6 | Data Exch. No. Field ID | Integer | Specifies the ID. This field is intended only for internal use. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation Field."No." where(TableNo = field("Table ID")) |
| 7 | Data Exch. Line Field ID | Integer | Specifies the ID. This field is intended only for internal use. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation Field."No." where(TableNo = field("Table ID")) |
| 8 | Data Exch. Line Def Code | Code[20] | — | TableRelation [Table 1227 "Data Exch. Line Def"](../table/1227.md) ("Data Exch. Line Def".Code where("Data Exch. Def Code" = field("Data Exch. Def Code"))); NotBlank |
| 9 | Pre-Mapping Codeunit | Integer | Specifies the codeunit that prepares the mapping between fields in Dynamics 365 and external data. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation AllObjWithCaption."Object ID" where("Object Type" = const(Codeunit)) |
| 10 | Post-Mapping Codeunit | Integer | Specifies the codeunit that completes the mapping between fields in Dynamics 365 and the external data file or service. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation AllObjWithCaption."Object ID" where("Object Type" = const(Codeunit)) |
| 20 | Use as Intermediate Table | Boolean | Specifies that the table that you select in the Table ID field is an intermediate table where the imported data is stored before it is mapped to the target table. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> |  |
| 21 | Key Index | Integer | Specifies the key index to sort the source records before exporting. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | TableRelation Key."No." where(TableNo = field("Table ID")) |
| 22 | Key | Text[250] | Specifies the key to sort the source records before exporting. <small>via [Page 1214 "Data Exch Mapping Card"](../page/1214.md)</small> | FlowField: lookup(Key.Key where(TableNo = field("Table ID"), "No." = field("Key Index"))); not editable |

## Keys

- Key1: Data Exch. Def Code, Data Exch. Line Def Code, Table ID (clustered)

## Events published

- `OnBeforeOnDelete(var DataExchMapping: Record "Data Exch. Mapping"; var IsHandled: Boolean)` (integration)

## Procedures

- `InsertRec(DataExchDefCode: Code[20]; DataExchLineDefCode: Code[20]; TableId: Integer; NewName: Text[250]; MappingCodeunit: Integer; DataExchNoFieldId: Integer; DataExchLineFieldId: Integer)`
- `InsertRecForExport(DataExchDefCode: Code[20]; DataExchLineDefCode: Code[20]; TableId: Integer; NewName: Text[250]; ProcessingCodeunit: Integer)`
- `InsertRecForImport(DataExchDefCode: Code[20]; DataExchLineDefCode: Code[20]; TableId: Integer; NewName: Text[250]; DataExchNoFieldId: Integer; DataExchLineFieldId: Integer)`
- `CreateDataExchMapping(TableID: Integer; CodeunitID: Integer; DataExchNoFieldID: Integer; DataExchLineFieldID: Integer)`
- `PositivePayUpdateCodeunits(): Boolean`

Plus 2 local procedures.

## Triggers

OnDelete, OnRename

## Relations

- Data Exch. Def Code: TableRelation [Table 1222 "Data Exch. Def"](../table/1222.md)
- Data Exch. Line Def Code: TableRelation [Table 1227 "Data Exch. Line Def"](../table/1227.md)

## Referenced by

2 fields in 2 objects relate to this table (TableRelation or CalcFormula).

- [Table 1225 "Data Exch. Field Mapping"](../table/1225.md): Table ID
- [Table 1238 "Data Exch. Field Grouping"](../table/1238.md): Table ID

## Pages and codeunits on this table

- [Page 1214 "Data Exch Mapping Card"](../page/1214.md) (source table)
- [Page 1219 "Data Exch Mapping Part"](../page/1219.md) (source table)
- [Codeunit 1268 "Export Launcher"](../codeunit/1268.md) (codeunit runs on it)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24

## Countries that replace it

[CA](../../localizations/ca.md), [MX](../../localizations/mx.md), [US](../../localizations/us.md)

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "table", object_name: "Data Exch. Mapping")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
