---
id: object/codeunit/4019
type: object
title: Codeunit 4019 "GP Item Migrator"
summary: Codeunit 4019 "GP Item Migrator" in HybridGP (Microsoft.DataMigration.GP). 12 public procedures, 1 events, 3 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - hybridgp
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: 96567b6f2427235776ae8c32a3825ccafa06d1ab3ebf4c3b43ee7bf5243cdd82
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/HybridGP/app/src/Migration/Items/GPItemMigrator.codeunit.al
    title: src/Apps/W1/HybridGP/app/src/Migration/Items/GPItemMigrator.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/9363
object_type: codeunit
object_id: 4019
name: GP Item Migrator
namespace: Microsoft.DataMigration.GP
app: HybridGP
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: 1
  subscribers: 3
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 7
  called_by: 1
  implements: 0
---

# Codeunit 4019 "GP Item Migrator"

> Codeunit 4019 "GP Item Migrator" in HybridGP (Microsoft.DataMigration.GP). 12 public procedures, 1 events, 3 event subscribers. Introduced in BC29, still in BC30.

HybridGP · Microsoft.DataMigration.GP · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/HybridGP/app/src/Migration/Items/GPItemMigrator.codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | GP Item |

## Events published

- `OnBeforeGetMaxItemBatchLineCount(var IsHandled: Boolean; var NewMaxLineCount: Integer)` (integration)

## Event subscriptions

- OnMigrateItem subscribes to Codeunit "Item Data Migration Facade" OnMigrateItem
- OnMigrateItemPostingGroups subscribes to Codeunit "Item Data Migration Facade" OnMigrateItemPostingGroups
- OnMigrateInventoryTransactions subscribes to Codeunit "Item Data Migration Facade" OnMigrateInventoryTransactions

## Procedures

- `MigrateItemImp(var Sender: Codeunit "Item Data Migration Facade"; RecordIdToMigrate: RecordId)` (internal)
- `MigrateItemPostingGroupsImp(var Sender: Codeunit "Item Data Migration Facade"; RecordIdToMigrate: RecordId; ChartOfAccountsMigrated: Boolean)` (internal)
- `MigrateInventoryTransactionsImp(var Sender: Codeunit "Item Data Migration Facade"; RecordIdToMigrate: RecordId; ChartOfAccountsMigrated: Boolean)` (internal)
- `MigrateKitItems()` (internal)
- `CreateItemCategories()` (internal)
- `CreateItemCategoryImp(var Item: Record Item)` (internal)
- `MigrateItem(var Sender: Codeunit "Item Data Migration Facade"; RecordIdToMigrate: RecordId)` (obsolete 28.0: Should not call this procedure directly.)
- `MigrateItemDetails(var GPItem: Record "GP Item"; ItemDataMigrationFacade: Codeunit "Item Data Migration Facade")` (obsolete 28.0: Should not call this procedure directly.)
- `MigrateItemPostingGroups(var Sender: Codeunit "Item Data Migration Facade"; RecordIdToMigrate: RecordId; ChartOfAccountsMigrated: Boolean)` (obsolete 28.0: Should not call this procedure directly.)
- `MigrateInventoryTransactions(var Sender: Codeunit "Item Data Migration Facade"; RecordIdToMigrate: RecordId; ChartOfAccountsMigrated: Boolean)` (obsolete 28.0: Should not call this procedure directly.)
- `MigrateItemInventoryPostingGroup(GPItem: Record "GP Item"; var Sender: Codeunit "Item Data Migration Facade")` (obsolete 28.0: Should not call this procedure directly.)
- `MigrateItemClassesIfNeeded(var GPItem: Record "GP Item"; var ItemDataMigrationFacade: Codeunit "Item Data Migration Facade")` (obsolete 28.0: Should not call this procedure directly.)

Plus 21 local procedures.

## Relations

- runs on [Table 4095 "GP Item"](../table/4095.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 6113 "Item Data Migration Facade"](../codeunit/6113.md) (23 calls: `CreateDefaultInventoryPostingGroup → CreateInventoryPostingSetupIfNeeded`, `CreateDefaultInventoryPostingGroup → SetInventoryPostingSetupInventoryAccount`, `CreateGeneralPostingSetup → CreateGeneralProductPostingSetupIfNeeded`, …)
- [Codeunit 1796 "Data Migration Error Logging"](../codeunit/1796.md) (7 calls: `CreateDefaultInventoryPostingGroup → SetLastRecordUnderProcessing`, `CreateInventoryPostingGroup → SetLastRecordUnderProcessing`, `CreateItemJnlLine → SetLastRecordUnderProcessing`, …)
- [Codeunit 4037 "Helper Functions"](../codeunit/4037.md) (7 calls: `ApplyGenPostingSetupCommonAccounts → GetPostingAccountNumber`, `CanAddGenProductPostingAccount → GetGPAccountNumberByIndex`, `CreateDefaultInventoryPostingGroup → GetPostingAccountNumber`, …)
- [Codeunit 99000830 "Create Reserv. Entry"](../codeunit/99000830.md) (2 calls: `CreateNewItemTrackingLinesIfNecessary → CreateEntry`, `CreateNewItemTrackingLinesIfNecessary → CreateReservEntryFor`)
- [Codeunit 1327 "Adjust Item Inventory"](../codeunit/1327.md) (1 call: `CreateItemJnlLine → SelectItemTemplateForAdjustment`)
- [Codeunit 6101 "Data Migration Status Facade"](../codeunit/6101.md) (1 call: `DecrementMigratedCount → IncrementMigratedRecordCount`)
- [Codeunit 99000835 "Item Jnl. Line-Reserve"](../codeunit/99000835.md) (1 call: `CreateNewItemTrackingLinesIfNecessary → InitFromItemJnlLine`)

## Called by

- [Codeunit 4037 "Helper Functions"](../codeunit/4037.md) (2 calls: `CreateItemCategories → CreateItemCategories`, `CreateKitItems → MigrateKitItems`)

## Recent changes

- 2026-09-11 [#9363 GP - Updates 202607](../../changes/bcapps/9363.md) (main, BC30, fix)

## Across versions

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

## Deprecations

- procedure MigrateInventoryTransactions: Pending 28.0 (#if not CLEAN28), "Should not call this procedure directly."
- procedure MigrateItem: Pending 28.0 (#if not CLEAN28), "Should not call this procedure directly."
- procedure MigrateItemClassesIfNeeded: Pending 28.0 (#if not CLEAN28), "Should not call this procedure directly."
- procedure MigrateItemDetails: Pending 28.0 (#if not CLEAN28), "Should not call this procedure directly."
- procedure MigrateItemInventoryPostingGroup: Pending 28.0 (#if not CLEAN28), "Should not call this procedure directly."
- procedure MigrateItemPostingGroups: Pending 28.0 (#if not CLEAN28), "Should not call this procedure directly."

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: "GP Item Migrator")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
