---
id: object/codeunit/2677
type: object
title: Codeunit 2677 "Gen. Journal Alloc. Acc. Mgt."
summary: Codeunit 2677 "Gen. Journal Alloc. Acc. Mgt." in Base Application (Microsoft.Finance.AllocationAccount). 7 public procedures, 4 events, 6 event subscribers. Present since at least BC23, still in BC30, changed in BC24-25, 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: 6caa6a0a71a625abc918d10b3d3913aa68d60ccd3aa2f2ece5c241de8e4af16d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/AllocationAccount/GenJournalAllocAccMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/AllocationAccount/GenJournalAllocAccMgt.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: 2677
name: Gen. Journal Alloc. Acc. Mgt.
namespace: Microsoft.Finance.AllocationAccount
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 36
  events: 4
  subscribers: 6
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 1
  implements: 0
---

# Codeunit 2677 "Gen. Journal Alloc. Acc. Mgt."

> Codeunit 2677 "Gen. Journal Alloc. Acc. Mgt." in Base Application (Microsoft.Finance.AllocationAccount). 7 public procedures, 4 events, 6 event subscribers. Present since at least BC23, still in BC30, changed in BC24-25, BC27.

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

## Events published

- `OnBeforeGetGeneralJournalLineType(var AllocationLine: Record "Allocation Line"; var GenJournalAccountType: Enum "Gen. Journal Account Type"; var Handled: Boolean)` (integration): Integration event raised before determining general journal account type for allocation line processing.
- `OnBeforeCreateGeneralJournalLine(var GenJournalLine: Record "Gen. Journal Line"; var AllocationLine: Record "Allocation Line"; var AllocationAccountGenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised before creating general journal line from allocation line for customization.
- `OnBeforeVerifyGeneralJournalLine(var GenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised before verifying general journal line for custom validation logic.
- `OnLoadManualAllocationLinesOnBeforeInsertAllocationLine(var AllocAccManualOverride: Record "Alloc. Acc. Manual Override"; var AllocationLine: Record "Allocation Line")` (integration)

## Event subscriptions

- PostAllocationJournalLine subscribes to Codeunit "Gen. Jnl.-Post Line" OnBeforeCode
- HandleBatchPost subscribes to Codeunit "Gen. Jnl.-Post Batch" OnBeforeCode
- HandleBeforeInsertGLEntryBuffer subscribes to Codeunit "Gen. Jnl.-Post Line" OnBeforeInsertGLEntryBuffer
- HandleShowDimensions subscribes to Table "Gen. Journal Line" OnBeforeShowDimensions
- CheckBeforeModifyLine subscribes to Table "Gen. Journal Line" OnBeforeModifyEvent
- VerifyGeneralJournalLineOnAfterModify subscribes to Table "Gen. Journal Line" OnAfterModifyEvent

## Procedures

- `GetOrGenerateAllocationLines(var AllocationLine: Record "Allocation Line"; var ParentSystemId: Guid)` (internal)
- `GetOrGenerateAllocationLines(var AllocationLine: Record "Allocation Line"; var ParentSystemId: Guid; var AmountToAllocate: Decimal; var PostingDate: Date)` (internal)
- `LoadManualAllocationLines(var GenJournalLine: Record "Gen. Journal Line"; var AllocationLine: Record "Allocation Line")` (internal)
- `VerifyAllGLAccountsUsed(var GenJournalLine: Record "Gen. Journal Line"): Boolean` (internal)
- `PreventAllocationAccountsFromThisPage(GenJournalAccountType: Enum "Gen. Journal Account Type")` (internal)
- `CreateLines(var AllocationAccountGenJournalLine: Record "Gen. Journal Line")`: Creates detailed general journal lines from allocation account entries.
- `VerifySelectedAllocationAccountNo(var GenJournalLine: Record "Gen. Journal Line")`: Validates that the selected allocation account configuration is compatible with the general journal line setup.

Plus 19 local procedures.

## 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 408 "DimensionManagement"](../codeunit/408.md) (2 calls: `TransferDimensionSetID → GetCombinedDimensionSetID`, `TransferDimensionSetID → UpdateGlobalDimFromDimSetID`)
- [Codeunit 2675 "Allocation Account Mgt."](../codeunit/2675.md) (1 call: `VerifyGeneralJournalLine → VerifyNoInheritFromParentUsed`)
- [Codeunit 2676 "Alloc. Acc. Telemetry"](../codeunit/2676.md) (1 call: `HandleBatchPost → LogGeneralJournalPostingUsage`)

## Called by

- [Table 2672 "Allocation Line"](../table/2672.md) (1 call: `GetOrGenerateAllocationLines → GetOrGenerateAllocationLines`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, 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: "Gen. Journal Alloc. Acc. Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
