---
id: object/codeunit/1797
type: object
title: Codeunit 1797 "Data Migration Facade Helper"
summary: Codeunit 1797 "Data Migration Facade Helper" in Base Application (System.Integration). 21 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: null
  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: e0ef9272871c74e90f60a6e3585deb6a03dd2667438859c7c84c16bbddfc7483
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/DataMigration/DataMigrationFacadeHelper.Codeunit.al
    title: src/Layers/W1/BaseApp/System/DataMigration/DataMigrationFacadeHelper.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/au
    - localization/nz
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 1797
name: Data Migration Facade Helper
namespace: System.Integration
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries:
  - au
  - nz
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 22
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 12
  implements: 0
---

# Codeunit 1797 "Data Migration Facade Helper"

> Codeunit 1797 "Data Migration Facade Helper" in Base Application (System.Integration). 21 public procedures. Present since at least BC23, still in BC30.

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

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |

## Procedures

- `CreateShipmentMethodIfNeeded(CodeToSet: Code[10]; DescriptionToSet: Text[50]): Code[10]`
- `CreateSalespersonPurchaserIfNeeded(CodeToSet: Code[20]; NameToSet: Text[50]; PhoneNoToSet: Text[30]; EmailToSet: Text[80]): Code[20]`
- `CreateCustomerPriceGroupIfNeeded(CodeToSet: Code[10]; DescriptionToSet: Text[50]; PriceIncludesVatToSet: Boolean): Code[10]`
- `CreatePaymentTermsIfNeeded(CodeToSet: Code[10]; DescriptionToSet: Text[50]; DueDateCalculationToSet: DateFormula): Code[10]`
- `CreateTerritoryIfNeeded(CodeToSet: Code[10]; Name: Text[50]): Code[10]`
- `CreateTaxAreaIfNeeded(CodeToSet: Code[20]; Description: Text[50]): Code[20]`
- `CreatePaymentMethodIfNeeded(CodeToSet: Code[10]; DescriptionToSet: Text[50]): Code[10]`
- `DoesPostCodeExist(CodeToSearch: Code[20]; CityToSearch: Text[30]): Boolean`
- `CreatePostCodeIfNeeded(CodeToSet: Code[20]; CityToSet: Text[30]; CountyToSet: Text[30]; CountryRegionCodeToSet: Code[10]): Boolean`
- `CreateCountryIfNeeded(CodeToSet: Code[10]; NameToSet: Text[50]; AddressFormatToSet: Option "Post Code+City","City+Post Code","City+County+Post Code","Blank Line+Post Code+City"; ContactAddressFormatToSet: Option First,"After Company Name",Last): Code[10]`
- `SearchCountry(CodeToSearch: Code[10]; NameToSearch: Text[50]; EUCountryRegionCodeToSearch: Code[10]; IntrastatCodeToSet: Code[10]; var CodeToGet: Code[10]): Boolean`
- `SearchLanguage(AbbreviatedNameToSearch: Code[3]; var CodeToGet: Code[10]): Boolean`
- `FixIfLcyCode(CurrencyCode: Code[10]): Code[10]`
- `CreateGeneralJournalBatchIfNeeded(GeneralJournalBatchCode: Code[10]; NoSeriesCode: Code[20]; PostingNoSeriesCode: Code[20])`
- `CreateGeneralJournalLine(var GenJournalLine: Record "Gen. Journal Line"; GeneralJournalBatchCode: Code[10]; DocumentNo: Code[20]; Description: Text[50]; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; PostingDate: Date; DueDate: Date; Amount: Decimal; AmountLCY: Decimal; Currency: Code[10]; BalancingAccount: Code[20])`
- `GetOrCreateDimension(DimensionCode: Code[20]; DimensionDescription: Text[50]; var Dimension: Record Dimension)`
- `GetOrCreateDimensionValue(DimensionCode: Code[20]; DimensionValueCode: Code[20]; DimensionValueName: Text[50]; var DimensionValue: Record "Dimension Value")`
- `CreateOnlyDefaultDimensionIfNeeded(DimensionCode: Code[20]; DimensionValueCode: Code[20]; TableId: Integer; EntityNo: Code[20])`
- `CreateDimensionSetId(OldDimensionSetId: Integer; DimensionCode: Code[20]; DimensionDescription: Text[50]; DimensionValueCode: Code[20]; DimensionValueName: Text[50]): Integer`
- `CreateSourceCodeIfNeeded(SourceCodeCode: Code[10]): Code[10]`
- `SetAlternativeContact(NameToSet: Text[50]; AddressToSet: Text[50]; Address2ToSet: Text[50]; PostCodeToSet: Code[20]; CityToSet: Text[30]; CountryToSet: Code[10]; EmailToset: Text[80]; PhoneNoToSet: Text[30]; FaxToSet: Text[30]; MobileNoToSet: Text[30]; LinkToTable: Integer; EntityNo: Code[20])`

Plus 1 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 408 "DimensionManagement"](../codeunit/408.md) (1 call: `CreateDimensionSetId → GetDimensionSetID`)
- [Codeunit 43 "Language"](../codeunit/43.md) (1 call: `SearchLanguage → GetLanguageCode`)

## Called by

- [Codeunit 6112 "Customer Data Migration Facade"](../codeunit/6112.md) (20 calls: `CreateCountryIfNeeded → CreateCountryIfNeeded`, `CreateCustomerPriceGroupIfNeeded → CreateCustomerPriceGroupIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → CreateOnlyDefaultDimensionIfNeeded`, …)
- [Codeunit 6111 "Vendor Data Migration Facade"](../codeunit/6111.md) (18 calls: `CreateCountryIfNeeded → CreateCountryIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → CreateOnlyDefaultDimensionIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → GetOrCreateDimension`, …)
- [Codeunit 6113 "Item Data Migration Facade"](../codeunit/6113.md) (7 calls: `CreateCustomerPriceGroupIfNeeded → CreateCustomerPriceGroupIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → CreateOnlyDefaultDimensionIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → GetOrCreateDimension`, …)
- [Codeunit 6110 "GL Acc. Data Migration Facade"](../codeunit/6110.md) (6 calls: `CreateDefaultDimensionAndRequirementsIfNeeded → CreateOnlyDefaultDimensionIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → GetOrCreateDimension`, `CreateDefaultDimensionAndRequirementsIfNeeded → GetOrCreateDimensionValue`, …)
- [Codeunit 4017 "GP Account Migrator"](../codeunit/4017.md) (4 calls: `CreateGLAccountBeginningBalanceImp → CreateGeneralJournalBatchIfNeeded`, `CreateGLAccountBeginningBalanceImp → CreateGeneralJournalLine`, `GenerateGLAccountTransactionsImp → CreateGeneralJournalBatchIfNeeded`, …)
- [Codeunit 47000 "SL Account Migrator"](../codeunit/47000.md) (2 calls: `CreateGLAccountBeginningBalance → CreateGeneralJournalLine`, `GenerateGLTransactionBatches → CreateGeneralJournalLine`)
- [Codeunit 4018 "GP Customer Migrator"](../codeunit/4018.md) (1 call: `OnMigrateCustomerTransactions → CreateSourceCodeIfNeeded`)
- [Codeunit 4022 "GP Vendor Migrator"](../codeunit/4022.md) (1 call: `MigrateVendorTransactions → CreateSourceCodeIfNeeded`)
- [Codeunit 47007 "SL SO Migrator"](../codeunit/47007.md) (1 call: `MigrateOpenSalesOrderData → CreateShipmentMethodIfNeeded`)
- [Codeunit 47011 "SL PO Migrator"](../codeunit/47011.md) (1 call: `MigrateOpenPurchaseOrderData → CreateShipmentMethodIfNeeded`)
- [Codeunit 47018 "SL Customer Migrator"](../codeunit/47018.md) (1 call: `MigrateCustomerTransactions → CreateSourceCodeIfNeeded`)
- [Codeunit 47021 "SL Vendor Migrator"](../codeunit/47021.md) (1 call: `MigrateVendorTransactions → CreateSourceCodeIfNeeded`)

## Across versions

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

## Countries that replace it

[AU](../../localizations/au.md), [NZ](../../localizations/nz.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). The call sections above are our own, per object, from the BC29 call graph. 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: "codeunit", object_name: "Data Migration Facade Helper")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
