---
id: object/codeunit/6110
type: object
title: Codeunit 6110 "GL Acc. Data Migration Facade"
summary: Codeunit 6110 "GL Acc. Data Migration Facade" in Base Application (System.Integration). 34 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC24, BC27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "27"
  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: b0bcf96e47be5bde4d91d9a2e6338f60235c58482844b73874361e3ebf5837cc
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/DataMigration/GLAccDataMigrationFacade.Codeunit.al
    title: src/Layers/W1/BaseApp/System/DataMigration/GLAccDataMigrationFacade.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6110
name: GL Acc. Data Migration Facade
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:
  - "24"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 39
  events: 5
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 11
  calls: 1
  called_by: 3
  implements: 0
---

# Codeunit 6110 "GL Acc. Data Migration Facade"

> Codeunit 6110 "GL Acc. Data Migration Facade" in Base Application (System.Integration). 34 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC24, BC27.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Data Migration Parameters |

## Events published

- `OnMigrateGlAccount(RecordIdToMigrate: RecordID)` (integration)
  - subscribers: [Codeunit 1911 "MigrationQB Account Migrator"](../codeunit/1911.md) OnMigrateGlAccount, [Codeunit 4017 "GP Account Migrator"](../codeunit/4017.md) OnMigrateGlAccount, [Codeunit 47000 "SL Account Migrator"](../codeunit/47000.md) OnMigrateGlAccount
- `OnCreateOpeningBalanceTrx(RecordIdToMigrate: RecordID)` (integration)
  - subscribers: [Codeunit 1911 "MigrationQB Account Migrator"](../codeunit/1911.md) OnCreateOpeningBalanceTrx, [Codeunit 4017 "GP Account Migrator"](../codeunit/4017.md) OnCreateOpeningBalanceTrx, [Codeunit 47000 "SL Account Migrator"](../codeunit/47000.md) OnCreateOpeningBalanceTrx
- `OnMigratePostingGroups(RecordIdToMigrate: RecordID)` (integration)
  - subscribers: [Codeunit 1911 "MigrationQB Account Migrator"](../codeunit/1911.md) OnMigratePostingGroups, [Codeunit 4017 "GP Account Migrator"](../codeunit/4017.md) OnMigratePostingGroups, [Codeunit 47000 "SL Account Migrator"](../codeunit/47000.md) OnMigratePostingGroups
- `OnMigrateAccountTransactions(RecordIdToMigrate: RecordID)` (integration)
  - subscribers: [Codeunit 4017 "GP Account Migrator"](../codeunit/4017.md) OnMigrateAccountTransactions, [Codeunit 47000 "SL Account Migrator"](../codeunit/47000.md) OnMigrateAccountTransactions
- `OnMigrateGlAccountDimensions(RecordIdToMigrate: RecordID)` (integration)

## Procedures

- `ModifyGLAccount(RunTrigger: Boolean)`
- `CreateGLAccountIfNeeded(AccountNoToSet: Code[20]; AccountNameToSet: Text[50]; AccountTypeToSet: Option Posting,Heading,Total,"Begin-Total","End-Total"): Boolean`
- `CreateGeneralPostingSetupIfNeeded(GeneralPostingGroupCode: Code[10])`
- `CreateGenProductPostingGroupIfNeeded(PostingGroupCode: Code[20]; PostingGroupDescription: Text[50])`
- `CreateGenBusinessPostingGroupIfNeeded(PostingGroupCode: Code[20]; PostingGroupDescription: Text[50])`
- `CreateGeneralJournalLine(GeneralJournalBatchCode: Code[10]; DocumentNo: Code[20]; Description: Text[50]; PostingDate: Date; DueDate: Date; Amount: Decimal; AmountLCY: Decimal; Currency: Code[10]; BalancingAccount: Code[20])`
- `CreateGeneralJournalBatchIfNeeded(GeneralJournalBatchCode: Code[10]; NoSeriesCode: Code[20]; PostingNoSeriesCode: Code[20])`
- `SetGlobalGLAccount(GLAccountNo: Code[20]): Boolean`
- `SetIncomeBalanceType(IncomeBalanceTypeToSet: Option "Income Statement","Balance Sheet")`
- `SetTotaling(TotalingToSet: Text[250])`
- `SetDebitCreditType(DebitCreditTypeToSet: Option Both,Debit,Credit)`
- `SetExchangeRateAdjustmentType(ExchangeRateAdjustmentTypeToSet: Option "No Adjustment","Adjust Amount","Adjust Additional-Currency Amount")`
- `SetDirectPosting(DirectPostingToSet: Boolean)`
- `SetBlocked(BlockedToSet: Boolean)`
- `SetLastModifiedDateTime(LastModifiedDateTimeToSet: DateTime)`
- `SetLastDateModified(LastDateModifiedToSet: Date)`
- `SetAccountCategory(AccountCategoryToSet: Option " ",Assets,Liabilities,Equity,Income,"Cost of Goods Sold",Expense)`
- `SetAccountSubCategory(AccountSubCategoryToSet: Integer)`
- `SetGeneralPostingSetupSalesAccount(GeneralPostingSetupCode: Code[20]; SalesAccount: Code[20])`
- `SetGeneralPostingSetupSalesLineDiscAccount(GeneralPostingSetupCode: Code[20]; SalesLineDiscAccount: Code[20])`
- `SetGeneralPostingSetupSalesInvDiscAccount(GeneralPostingSetupCode: Code[20]; SalesInvDiscAccount: Code[20])`
- `SetGeneralPostingSetupSalesPmtDiscDebitAccount(GeneralPostingSetupCode: Code[20]; SalesPmtDiscDebitAccount: Code[20])`
- `SetGeneralPostingSetupPurchAccount(GeneralPostingSetupCode: Code[20]; PurchAccount: Code[20])`
- `SetGeneralPostingSetupPurchLineDiscAccount(GeneralPostingSetupCode: Code[20]; PurchLineDiscAccount: Code[20])`
- `SetGeneralPostingSetupPurchInvDiscAccount(GeneralPostingSetupCode: Code[20]; PurchInvDiscAccount: Code[20])`
- `SetGeneralPostingSetupPurchCreditMemoAccount(GeneralPostingSetupCode: Code[20]; PurchCreditMemoAccount: Code[20])`
- `SetGeneralPostingSetupCOGSAccount(GeneralPostingSetupCode: Code[20]; CogsAccount: Code[20])`
- `SetGeneralPostingSetupInventoryAdjmtAccount(GeneralPostingSetupCode: Code[20]; InventoryAdjmtAccount: Code[20])`
- `SetGeneralPostingSetupSalesCreditMemoAccount(GeneralPostingSetupCode: Code[20]; SalesCreditMemoAccount: Code[20])`
- `SetGeneralPostingSetupPurchPmtDiscDebitAccount(GeneralPostingSetupCode: Code[20]; PurchPmtDiscDebitAccount: Code[20])`
- `SetGeneralPostingSetupPurchPrepaymentsAccount(GeneralPostingSetupCode: Code[20]; PurchPrepaymentsAccount: Code[20])`
- `SetGeneralPostingSetupPurchaseVarianceAccount(GeneralPostingSetupCode: Code[20]; PurchaseVarianceAccount: Code[20])`
- `CreateDefaultDimensionAndRequirementsIfNeeded(DimensionCode: Text[20]; DimensionDescription: Text[50]; DimensionValueCode: Code[20]; DimensionValueName: Text[50])`
- `SetGeneralJournalLineDimension(var GenJournalLine: Record "Gen. Journal Line"; DimensionCode: Code[20]; DimensionDescription: Text[50]; DimensionValueCode: Code[20]; DimensionValueName: Text[50])`

## Triggers

OnRun

## Relations

- runs on [Table 1798 "Data Migration Parameters"](../table/1798.md)

## 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 1797 "Data Migration Facade Helper"](../codeunit/1797.md) (6 calls: `CreateDefaultDimensionAndRequirementsIfNeeded → CreateOnlyDefaultDimensionIfNeeded`, `CreateDefaultDimensionAndRequirementsIfNeeded → GetOrCreateDimension`, `CreateDefaultDimensionAndRequirementsIfNeeded → GetOrCreateDimensionValue`, …)

## Called by

- [Codeunit 4017 "GP Account Migrator"](../codeunit/4017.md) (22 calls: `MigrateGLAccountDetailsImp → CreateGLAccountIfNeeded`, `MigrateGLAccountDetailsImp → ModifyGLAccount`, `MigrateGLAccountDetailsImp → SetAccountCategory`, …)
- [Codeunit 1911 "MigrationQB Account Migrator"](../codeunit/1911.md) (21 calls: `MigrateAccountDetails → CreateGLAccountIfNeeded`, `MigrateAccountDetails → ModifyGLAccount`, `MigrateAccountDetails → SetAccountCategory`, …)
- [Codeunit 47000 "SL Account Migrator"](../codeunit/47000.md) (21 calls: `MigrateAccountDetails → CreateGLAccountIfNeeded`, `MigrateAccountDetails → ModifyGLAccount`, `MigrateAccountDetails → SetAccountCategory`, …)

## Across versions

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

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: "GL Acc. Data Migration Facade")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
