---
id: object/codeunit/46875
type: object
title: Codeunit 46875 "BC14 Migration Runner"
summary: Codeunit 46875 "BC14 Migration Runner" in HybridBC14 (Microsoft.DataMigration.BC14Reimplementation). 8 public procedures, 12 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - hybridbc14
versions:
  introduced: "29"
  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: 6b57110d0c7b1f1aad08a1a13fca03fe643f84acbf70c98f4161ba1e7be43d84
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/HybridBC14/app/src/Orchestration/BC14MigrationRunner.codeunit.al
    title: src/Apps/W1/HybridBC14/app/src/Orchestration/BC14MigrationRunner.codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9663
    - change/bcapps/9200
object_type: codeunit
object_id: 46875
name: BC14 Migration Runner
namespace: Microsoft.DataMigration.BC14Reimplementation
app: HybridBC14
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 37
  events: 12
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 6
  called_by: 4
  implements: 0
---

# Codeunit 46875 "BC14 Migration Runner"

> Codeunit 46875 "BC14 Migration Runner" in HybridBC14 (Microsoft.DataMigration.BC14Reimplementation). 8 public procedures, 12 events. Introduced in BC29, still in BC30.

HybridBC14 · Microsoft.DataMigration.BC14Reimplementation · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/HybridBC14/app/src/Orchestration/BC14MigrationRunner.codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Hybrid Replication Summary |

## Events published

- `OnBeforeContinueMigration()` (integration)
- `OnValidateBeforeMigration(var CanProceed: Boolean; var ErrorMessage: Text)` (integration): Integration event raised before migration starts to allow validation. Subscribe to this event to perform custom validation before migration begins. Set CanProceed to false and provide an error message to prevent migration from starting.
- `OnAfterPopulateSetupMigrators(Migrators: List of [Enum "BC14 Setup Migrator"]; var NewMigrators: List of [Enum "BC14 Setup Migrator"]; var Changed: Boolean)` (integration): Integration event raised after the default Setup-phase migrator list is populated. Leave empty and false to accept the defaults, or populate with the desired full list and set to true to replace the defaults entirely. Migrators are identified by their strongly-typed "BC14 Setup Migrator" enum value,...
- `OnAfterPopulateMasterMigrators(Migrators: List of [Enum "BC14 Master Migrator"]; var NewMigrators: List of [Enum "BC14 Master Migrator"]; var Changed: Boolean)` (integration): Integration event raised after the default Master Data-phase migrator list is populated. See for replacement semantics.
- `OnAfterPopulateTransactionMigrators(Migrators: List of [Enum "BC14 Transaction Migrator"]; var NewMigrators: List of [Enum "BC14 Transaction Migrator"]; var Changed: Boolean)` (integration): Integration event raised after the default Transaction-phase migrator list is populated. See for replacement semantics.
- `OnAfterPopulateHistoricalMigrators(Migrators: List of [Enum "BC14 Historical Migrator"]; var NewMigrators: List of [Enum "BC14 Historical Migrator"]; var Changed: Boolean)` (integration): Integration event raised after the default Historical-phase migrator list is populated. See for replacement semantics.
- `OnAfterPopulateActions(ActionList: List of [Enum "BC14 Post Migration Action"]; var NewActions: List of [Enum "BC14 Post Migration Action"]; var Changed: Boolean)` (integration): Integration event raised after the default action list is populated. See for replacement semantics.
- `OnBeforeRunMigrator(MigratorName: Text[250]; var SkipMigrator: Boolean)` (integration): Integration event raised before migrating a specific entity type. Intended for observability (logging, telemetry) and bulk skip decisions. To target a specific migrator for skip/reorder/remove, subscribe to OnAfterPopulate&lt;Phase&gt;Migrators instead — that event exposes the strongly-typed phase e...
- `OnAfterRunMigrator(MigratorName: Text[250]; Success: Boolean; RemainingPercentage: Integer)` (integration): Integration event raised after migrating a specific entity type. Subscribe to perform post-processing or logging.
- `OnBeforeRunAction(ActionId: Enum "BC14 Post Migration Action"; ActionName: Text[250]; var SkipAction: Boolean)` (integration): Integration event raised before executing a migration action. Subscribe to perform pre-processing or to skip specific actions.
- `OnAfterRunAction(ActionId: Enum "BC14 Post Migration Action"; ActionName: Text[250]; Success: Boolean)` (integration): Integration event raised after executing a migration action. Subscribe to perform post-processing or logging.
- `OnAfterPopulateValidations(ValidationList: List of [Enum "BC14 Migration Validation"]; var NewValidations: List of [Enum "BC14 Migration Validation"]; var Changed: Boolean)` (integration): Integration event raised after the default validation list is populated. See for replacement semantics.

## Procedures

- `RunMigration()`
- `RunMigration(SuppressErrors: Boolean)` (internal)
- `ContinueMigrationForCompany(TargetCompanyName: Text[30])`
- `RerunHistoricalForCompany(TargetCompanyName: Text[30])` (internal)
- `RunHistoricalMigrations(): Boolean` (internal)
- `GetTotalErrorCount(): Integer`
- `TryFinalizeCompanyMigration()` (internal): Gated company-level finalize: exits early if migration state is already Completed or if the company is not yet ready to finalize (Posting + Historical both done). Safe to call from any path that may have just advanced Posting or Historical — the gate makes it idempotent and order-independent across ...
- `FailMigration()` (internal): Skips success-path validations (e.g. balance checks) — they are meaningless on failure.

Plus 17 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 4001 "Hybrid Replication Summary"](../table/4001.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 46866 "BC14 Telemetry"](../codeunit/46866.md) (13 calls: `ContinueCompanyMigration → GetCategory`, `DispatchHistoricalMigration → GetCategory`, `ExecuteMigrationPhase → GetCategory`, …)
- [Codeunit 46862 "BC14 Migration Orchestrator"](../codeunit/46862.md) (10 calls: `ContinueCompanyMigration → FindLatestReplicationSummary`, `ContinueCompanyMigration → TryFinalizeOverallUpgrade`, `ContinueMigrationForCompany → FindLatestReplicationSummary`, …)
- [Codeunit 46858 "BC14 Migration Status Mgr."](../codeunit/46858.md) (7 calls: `ContinueCompanyMigration → AfterCompanyMigrationCompleted`, `ContinueMigrationForCompany → AcquireRerunSlot`, `ContinueMigrationForCompany → SetSummaryInProgress`, …)
- [Codeunit 46864 "BC14 Historical Task Worker"](../codeunit/46864.md) (2 calls: `DispatchHistoricalMigration → (object)`, `RerunHistoricalForCompany → (object)`)
- [Codeunit 46854 "BC14 Migration Error Handler"](../codeunit/46854.md) (1 call: `TryFinalizeCompanyMigration → ErrorOccurredInCurrentCompany`)
- [Codeunit 46860 "BC14 Migration Failure Handler"](../codeunit/46860.md) (1 call: `ContinueCompanyMigration → MarkUpgradeFailed`)

## Called by

- [Codeunit 46864 "BC14 Historical Task Worker"](../codeunit/46864.md) (2 calls: `OnRun → RunHistoricalMigrations`, `OnRun → TryFinalizeCompanyMigration`)
- [Codeunit 46853 "BC14 Company Upgrade Task"](../codeunit/46853.md) (1 call: `RunBC14Migration → RunMigration`)
- [Codeunit 46860 "BC14 Migration Failure Handler"](../codeunit/46860.md) (1 call: `OnRun → FailMigration`)
- [Page extension 46870 "BC14 Cloud Migration Mgmt Ext"](../pageextension/46870.md) (1 call: `RerunFailedCompanies → ContinueMigrationForCompany`)

## Recent changes

- 2026-08-04 [#9663 Migrate customer, vendor and item transactions for BC14 cloud migration](../../changes/bcapps/9663.md) (main, BC30, feature)
- 2026-07-23 [#9200 Cloud Migration bug fixes (BC14 reimplementation, custom mapping, OnPrem dev companies)](../../changes/bcapps/9200.md) (main, BC30, fix)

## Across versions

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

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: "BC14 Migration Runner")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
