---
id: object/codeunit/181
type: object
title: Codeunit 181 "Copy Gen. Journal Mgt."
summary: Codeunit 181 "Copy Gen. Journal Mgt." in Base Application (Microsoft.Finance.GeneralLedger.Journal). 2 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 57c95c14f80e2ad805b5fab90cbfab67dc85f47e6199119640975c2566087c76
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/CopyGenJournalMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/CopyGenJournalMgt.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: 181
name: Copy Gen. Journal Mgt.
namespace: Microsoft.Finance.GeneralLedger.Journal
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 15
  events: 5
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 181 "Copy Gen. Journal Mgt."

> Codeunit 181 "Copy Gen. Journal Mgt." in Base Application (Microsoft.Finance.GeneralLedger.Journal). 2 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC28.

Base Application · Microsoft.Finance.GeneralLedger.Journal · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/CopyGenJournalMgt.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeInsertGenJournalLine(var PostedGenJournalLine: Record "Posted Gen. Journal Line"; var CopyGenJournalParameters: Record "Copy Gen. Journal Parameters")` (integration): Integration event raised before inserting a copied general journal line from posted transaction. Allows modification of posted data or copy parameters before creating the new journal line.
- `OnAfterCheckIfCanBeCopied(PostedGenJournalLine: Record "Posted Gen. Journal Line")` (integration): Integration event raised after validating that posted general journal lines can be copied. Provides extensibility for additional validation rules or custom copy eligibility checks.
- `OnAfterInsertGenJournalLine(PostedGenJournalLine: Record "Posted Gen. Journal Line"; CopyGenJournalParameters: Record "Copy Gen. Journal Parameters"; var GenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised after successfully inserting a copied general journal line into the active batch. Enables post-processing of the newly created journal line or additional field updates.
  - subscribers: [Codeunit 4850 "AA Codes Posting Helper"](../codeunit/4850.md) OnAfterInsertGenJournalLine
- `OnAfterGetCopyParameters(var CopyGenJournalParameters: Record "Copy Gen. Journal Parameters"; var Result: Boolean)` (integration): Integration event raised after retrieving copy parameters from the user interface. Allows modification of copy parameters or overriding the user's parameter selection result.
- `OnCheckIfCanBeCopiedOnBeforeSkipValidationOrError(PostedGenJournalLine: Record "Posted Gen. Journal Line"; var ConfirmHandled: Boolean; var ConfirmResponse: Boolean)` (integration): Integration event raised before confirming whether to skip validation when no G/L Register is found. Provides extensibility for handling the confirmation or overriding the default behavior.

## Procedures

- `CopyToGenJournal(var PostedGenJournalLine: Record "Posted Gen. Journal Line")`: Copies posted general journal lines to an active general journal batch for reprocessing or correction. Validates posted lines can be copied and prompts user for copy parameters before creating new journal lines.
- `CopyGLRegister(var SrcPostedGenJournalLine: Record "Posted Gen. Journal Line")`: Copies complete G/L registers (all posted lines from specific register numbers) to active general journal batches. Handles bulk copying of entire posting transactions organized by G/L register with validation and parameter setup.

Plus 8 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 27 "Confirm Management"](../codeunit/27.md) (2 calls: `CheckIfCanBeCopied → GetResponseOrDefault`, `ShowFinishMessage → GetResponse`)
- [Codeunit 230 "GenJnlManagement"](../codeunit/230.md) (1 call: `ShowFinishMessage → TemplateSelectionFromBatch`)

## Across versions

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

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: "Copy Gen. Journal Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
