Skip to content

Migrate customer, vendor and item transactions for BC14 cloud migration#9663

Draft
gggdttt wants to merge 4 commits into
mainfrom
features/CloudMigrationBC14-CustVendItemTransactions
Draft

Migrate customer, vendor and item transactions for BC14 cloud migration#9663
gggdttt wants to merge 4 commits into
mainfrom
features/CloudMigrationBC14-CustVendItemTransactions

Conversation

@gggdttt

@gggdttt gggdttt commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Problem

BC14 cloud migration only migrates G/L transactions. Customer, vendor and item subledger transactions are not carried across (work item 642787). This PR delivers the customer slice as the reviewable template; vendor and item will follow the same pattern.

Solution

Mirrors the existing G/L two-tier design (live re-post vs. read-only archive), following how GP migrates customer transactions as opening balances.

Current (live) path — codeunit BC14 Cust. Ledger Migrator (46939)

  • Replicates Cust. Ledger Entry + Detailed Cust. Ledg. Entry into buffer tables 46937 / 46938.
  • For each open entry, stages a customer opening-balance general journal line for the outstanding amount, with the balancing account = the customer posting group's Receivables control account. Because the G/L Entry migrator already re-posts the receivables control account, this nets the G/L impact to zero while reconstructing the customer subledger detail.
  • Uses the same cutoff split as the G/L migrator (>= cutoff posted live, < cutoff archived; 0D = everything live). Lines post through the existing BC14 Journal Post Action (batch prefix BC14CU).

Historical (archive) path — codeunit BC14 Old Cust. Ledger Migr. (46940)

  • Copies pre-cutoff customer ledger entries read-only into the new archive table BC14 Old Cust. Ledg. Entry (46886) + list page (46887) in the Business Central 14 Historical Data app, mirroring the Old G/L Entry archive (resumable, batched commits).

Changes

  • Main app: buffer tables 46937/46938, current migrator 46939, historical migrator 46940; registered in the BC14 Transaction Migrator / BC14 Historical Migrator enums and in PopulateTransactionMigrators / PopulateHistoricalMigrators.
  • Historical Data app: archive table 46886, list page 46887, permission set entry.

Validation

Both apps compile clean with CodeCop, AppSourceCop, PerTenantExtensionCop and UICop (repo ruleset). No automated tests yet.

Notes / open items

…cloud migration

Adds customer ledger entry migration alongside the existing G/L-only transaction migration (work item 642787).

Current path: open customer ledger entries are re-created as opening-balance general journal lines, balanced against the customer posting group's receivables control account so the G/L nets to zero (the G/L Entry migrator already carries the receivables balance) while the customer subledger detail is reconstructed. Follows the same cutoff split as the G/L Entry migrator.

Historical path: pre-cutoff customer ledger entries are copied read-only into a new BC14 Old Cust. Ledg. Entry archive table (Business Central 14 Historical Data app), mirroring the Old G/L Entry archive.

New objects: buffer tables 46937/46938, transaction migrator 46939, historical migrator 46940 (main app); archive table 46886 + list page 46887 (historical data app). Registered in the transaction/historical migrator enums and the runner phase population.
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Integration GitHub request for Integration area labels Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234'

…14 cloud migration

Replicates the customer ledger migration pattern for vendors (work item 642787): open vendor ledger entries are re-created as opening-balance journal lines balanced against the vendor posting group's payables control account (net-zero G/L), and pre-cutoff entries are archived read-only into a new BC14 Old Vendor Ledg. Entry table. New objects: buffer tables 46941/46942, transaction migrator 46943, historical migrator 46944 (main app); archive table 46888 + list page 46889 (historical data app).
@github-actions github-actions Bot added the Build: Automation Workflows and other setup in .github folder label Jul 22, 2026
wenjiefan added 2 commits July 22, 2026 14:50
…igration

Item transactions are migrated read-only (work item 642787): the full item ledger, with each entry's actual cost summed from its value entries, is archived into a new BC14 Old Item Ledg. Entry table. Live on-hand inventory is not re-created (no Transaction-phase item migrator), so there is no item-journal posting subsystem. New objects: buffer tables 46945/46946, historical migrator 46947 (main app); archive table 46899 + list page 46891 (historical data app), wired into the historical migrator enum and runner.
Adds test codeunits 148915 (customer current migrator), 148916 (vendor current migrator), and 148917 (item archive migrator) covering GetDisplayName, IsEnabled module gating, net-zero control-account balancing, settled-entry skip, idempotency, and the item archive fallback path with cost summed from value entries (work item 642787).
@gggdttt gggdttt changed the title Migrate customer ledger transactions (current + historical) for BC14 cloud migration Migrate customer, vendor and item transactions for BC14 cloud migration Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Build: Automation Workflows and other setup in .github folder Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant