---
id: object/codeunit/13
type: object
title: Codeunit 13 "Gen. Jnl.-Post Batch"
summary: Codeunit 13 "Gen. Jnl.-Post Batch" in Base Application (Microsoft.Finance.GeneralLedger.Posting). 8 public procedures, 81 events. Present since at least BC23, still in BC30, changed in BC24-25, 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: 9343ba814b4e0f5bc38ffa2da5b3fcb8885dc93436523468de21aa007a3905bb
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/GeneralLedger/Posting/GenJnlPostBatch.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/GeneralLedger/Posting/GenJnlPostBatch.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/at
    - localization/au
    - localization/ch
    - localization/de
    - localization/es
    - localization/nz
    - localization/ru
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/8959
object_type: codeunit
object_id: 13
name: Gen. Jnl.-Post Batch
namespace: Microsoft.Finance.GeneralLedger.Posting
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"
  - "28"
source_major: "29"
obsolete: null
countries:
  - at
  - au
  - ch
  - de
  - es
  - nz
  - ru
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 155
  events: 81
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 10
  calls: 14
  called_by: 14
  implements: 0
---

# Codeunit 13 "Gen. Jnl.-Post Batch"

> Codeunit 13 "Gen. Jnl.-Post Batch" in Base Application (Microsoft.Finance.GeneralLedger.Posting). 8 public procedures, 81 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Gen. Journal Line |
| Permissions | TableData "Gen. Journal Batch" = rimd, TableData "Gen. Journal Line" = rimd |

## Events published

- `OnAfterCheckDocumentNo(var GenJournalLine: Record "Gen. Journal Line"; LastDocNo: code[20]; LastPostedDocNo: code[20])` (integration): Integration event raised after validating document numbers for journal lines. Enables custom processing or additional validation after document number checks are complete.
- `OnAfterCode(var GenJournalLine: Record "Gen. Journal Line"; PreviewMode: Boolean)` (integration): Integration event raised after completing all posting batch operations. Enables cleanup, logging, or additional processing after journal batch posting is finished.
- `OnAfterCopyGenJnlLineBalancingData(var GenJnlLineTo: Record "Gen. Journal Line"; GenJnlLineFrom: Record "Gen. Journal Line")` (integration): Integration event raised after copying balancing account data between journal lines. Enables modification or validation of copied balancing information.
- `OnAfterGetPostingStateMsg(PostingState: Integer; var Result: Text)` (integration): Integration event raised after determining the posting state message text. Enables customization of progress messages shown during posting operations.
- `OnAfterPostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; CommitIsSuppressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; IsPosted: Boolean; var PostingGenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised after posting an individual general journal line. Enables post-processing, logging, or additional operations after line posting completion.
  - subscribers: [Codeunit 1690 "Bank Deposit-Post"](../codeunit/1690.md) InsertPostedBankDepositLineAfterPostingGenJnlLine
- `OnAfterPostGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"; var Result: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration): Integration event raised after posting a general journal line with result status. Enables result processing and validation after individual line posting operations.
  - subscribers: [Codeunit 7251 "Bank Acc. Rec. Trans. to Acc."](../codeunit/7251.md) InsertStatementMatchingBufferOnAfterPostGenJournalLine
- `OnAfterProcessLines(var TempGenJournalLine: Record "Gen. Journal Line" temporary; var GenJournalLine: Record "Gen. Journal Line"; SuppressCommit: Boolean; PreviewMode: Boolean)` (integration): Integration event raised after completing batch processing of general journal lines. Enables custom post-processing logic and finalization tasks after batch posting operations.
- `OnAfterShouldSetDocNoToLastPosted(var GenJournalLine: Record "Gen. Journal Line"; LastDocNo: Code[20]; var Result: Boolean)` (integration): Integration event raised after determining whether to set document number to last posted value. Enables custom logic for document number assignment and sequential numbering validation.
- `OnBeforeCheckBalance(GenJnlTemplate: Record "Gen. Journal Template"; GenJnlLine: Record "Gen. Journal Line"; CurrentBalance: Decimal; CurrentBalanceReverse: Decimal; CurrencyBalance: Decimal; StartLineNo: Integer; StartLineNoReverse: Integer; LastDocType: Option; LastDocNo: Code[20]; LastDate: Date; LastCurrencyCode: Code[10]; CommitIsSuppressed: Boolean)` (integration): Integration event raised before performing balance validation for journal batch processing. Enables custom balance checking logic and validation rule customization for posting operations.
- `OnBeforeCheckCorrection(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean; GenJnlTemplate: Record "Gen. Journal Template"; var LastDate: Date; var LastDocType: Enum "Gen. Journal Document Type"; var LastDocNo: Code[20]; var DocCorrection: Boolean)` (integration): Integration event raised before performing correction validation for journal line processing. Enables custom correction logic and validation rule customization for document correction scenarios.
- `OnBeforeCheckGenPostingType(GenJnlLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type"; var IsHandled: Boolean)` (integration): Integration event raised before validating general posting type for journal line processing. Enables custom posting type validation and account type-specific business rule enforcement.
  - subscribers: [Codeunit 1690 "Bank Deposit-Post"](../codeunit/1690.md) OnBeforeCheckGenPostingType
- `OnBeforeClearDataExchEntries(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration): Integration event raised before clearing data exchange entries for journal line processing. Enables custom data exchange cleanup logic and integration with external data sources.
- `OnBeforeCode(var GenJournalLine: Record "Gen. Journal Line"; PreviewMode: Boolean; CommitIsSuppressed: Boolean)` (integration): Integration event raised before starting batch posting processing for general journal lines. Enables custom initialization logic and preprocessing workflows before posting operations begin.
  - subscribers: [Codeunit 2677 "Gen. Journal Alloc. Acc. Mgt."](../codeunit/2677.md) HandleBatchPost
- `OnBeforeCountGenJournalLines(var GenJournalLine: Record "Gen. Journal Line"; var GenJournalLineCount: Integer; var IsHandled: Boolean)` (integration): Integration event raised before counting general journal lines for batch processing. Enables custom line counting logic and filtering for batch operation scope determination.
- `OnBeforeCommit(GLRegNo: Integer; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration): Integration event raised before committing database transactions during batch posting. Enables custom commit logic and transaction management for posting operations.
- `OnBeforeCopyFields(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration): Integration event raised before copying fields during journal line processing. Enables custom field copying logic and data transformation workflows.
- `OnBeforeCreateDimBalGenJnlLines(var SrcGenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeIfCheckBalance(GenJnlTemplate: Record "Gen. Journal Template"; GenJnlLine: Record "Gen. Journal Line"; var LastDocType: Option; var LastDocNo: Code[20]; var LastDate: Date; var CheckIfBalance: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; CurrentBalance: Decimal)` (integration)
- `OnBeforeIsPostingDateAllowed(var GenJournalLine: Record "Gen. Journal Line"; var IsAllowed: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforePostAllocations(var AllocateGenJnlLine: Record "Gen. Journal Line"; Reversing: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; CommitIsSuppressed: Boolean; var Posted: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PostingGenJournalLine: Record "Gen. Journal Line")` (integration)
  - subscribers: [Codeunit 1690 "Bank Deposit-Post"](../codeunit/1690.md) OnBeforePostGenJnlLine
- `OnBeforeProcessLines(var GenJournalLine: Record "Gen. Journal Line"; PreviewMode: Boolean; CommitIsSuppressed: Boolean)` (integration)
- `OnBeforeProcessBalanceOfLines(var GenJournalLine: Record "Gen. Journal Line"; var GenJournalBatch: Record "Gen. Journal Batch"; var GenJournalTemplate: Record "Gen. Journal Template"; var IsKeySet: Boolean)` (integration)
  - subscribers: [Codeunit 6786 "Withholding Tax Jnl Subscriber"](../codeunit/6786.md) OnBeforeProcessBalanceOfLines
- `OnBeforeRaiseExceedLengthError(var GenJournalBatch: Record "Gen. Journal Batch"; var RaiseError: Boolean; var GenJnlLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeThrowPreviewError(var GenJournalLine: Record "Gen. Journal Line"; GLRegNo: Integer)` (integration)
- `OnBeforeUpdateRecurringAmt(var GenJnlLine2: Record "Gen. Journal Line"; var Updated: Boolean; var IsHandled: Boolean; var GLEntry: Record "G/L Entry"; var GLAccount: Record "G/L Account"; var GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration)
- `OnBeforeUpdateAndDeleteLines(var GenJournalLine: Record "Gen. Journal Line"; CommitIsSuppressed: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateIncomingDocument(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnCheckLineOnBeforeRunCheck(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnAfterIncrementBatchName(var GenJournalBatch: Record "Gen. Journal Batch"; OldBatchName: Code[10])` (integration)
- `OnAfterPostAllocations(GenJournalLine: Record "Gen. Journal Line"; Reversing: Boolean; CommitIsSuppressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration)
- `OnAfterMakeRecurringTexts(var GenJournalLine: Record "Gen. Journal Line"; var AccountingPeriod: Record "Accounting Period"; var Day: Integer; var Week: Integer; var Month: Integer; var MonthText: Text[30])` (integration)
- `OnPostAllocationsOnBeforeCopyFromGenJnlAlloc(var GenJournalLine: Record "Gen. Journal Line"; var AllocateGenJournalLine: Record "Gen. Journal Line"; var Reversing: Boolean)` (integration)
- `OnAfterMultiplyAmounts(var GenJournalLine: Record "Gen. Journal Line"; Factor: Decimal; CommitIsSuppressed: Boolean)` (integration)
- `OnAfterPostReversingLines(var GenJournalLine: Record "Gen. Journal Line"; PreviewMode: Boolean)` (integration)
- `OnAfterProcessBalanceOfLines(var GenJournalLine: Record "Gen. Journal Line")` (integration)
  - subscribers: [Codeunit 6786 "Withholding Tax Jnl Subscriber"](../codeunit/6786.md) ProcessBalanceOfLines
- `OnAfterUpdateLineBalance(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeMultiplyJobAmounts(var GenJournalLine: Record "Gen. Journal Line"; Factor: Decimal; var IsHandled: Boolean)` (integration)
- `OnPostAllocationsOnBeforePostNotReversingLine(var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; AllocateGenJournalLine: Record "Gen. Journal Line"; var GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration)
- `OnPostAllocationsOnBeforePostReversingLine(var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; AllocateGenJournalLine: Record "Gen. Journal Line"; var GenJnlAllocation: Record "Gen. Jnl. Allocation")` (integration)
- `OnPostAllocationsOnBeforePrepareGenJnlLineAddCurr(var GenJournalLine: Record "Gen. Journal Line"; AllocateGenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnPostReversingLinesOnBeforeGenJnlPostLine(var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean)` (integration)
- `OnProcessBalanceOfLinesOnAfterCalcShouldCheckDocNoBasedOnNoSeries(var GenJournalLine: Record "Gen. Journal Line"; var GenJournalBatch: Record "Gen. Journal Batch"; var ShouldCheckDocNoBasedOnNoSeries: Boolean; var SkipCheckingPostingNoSeries: Boolean; LastDocNo: Code[20]; CurrentBalance: Decimal)` (integration)
- `OnProcessLinesOnAfterAssignGLNegNo(var GenJournalLine: Record "Gen. Journal Line"; GLRegister: Record "G/L Register"; GLRegNo: Integer)` (integration)
- `OnProcessLinesOnAfterPostGenJnlLines(var GenJournalLine: Record "Gen. Journal Line"; GLRegister: Record "G/L Register"; var GLRegNo: Integer; PreviewMode: Boolean)` (integration)
  - subscribers: [Codeunit 5579 "Digital Voucher Impl."](../codeunit/5579.md) OnProcessLinesOnAfterPostGenJnlLines
- `OnProcessLinesOnBeforeSetGLRegNoToZero(var GenJournalLine: Record "Gen. Journal Line"; var GLRegNo: Integer; var IsHandled: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration)
- `OnProcessLinesOnBeforeClearPostingCodeunits(var GenJournalLine: Record "Gen. Journal Line"; SuppressCommit: Boolean)` (integration)
- `OnAfterIsNonZeroAmount(GenJournalLine: Record "Gen. Journal Line"; var Result: Boolean)` (integration)
- `OnProcessICLinesOnBeforeHandledICInboxTransModify(var HandledICInboxTrans: Record "Handled IC Inbox Trans."; GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnCheckAllocationsOnAfterCalcShowAllocationsRecurringError(var GenJnlAllocation: Record "Gen. Jnl. Allocation"; var GenJournalLine: Record "Gen. Journal Line"; var ShowAllocationsRecurringError: Boolean)` (integration)
- `OnCheckAndCopyBalancingDataOnBeforeCheckGenPostingType(GenJnlLine4: Record "Gen. Journal Line"; GenJnlLine6: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type")` (integration)
- `OnCopyFieldsOnAfterSetGenJnlFilters(var GenJnlLine4: Record "Gen. Journal Line"; var GenJnlLine6: Record "Gen. Journal Line")` (integration)
- `OnBeforeCheckRecurringLine(GenJnlLine2: Record "Gen. Journal Line"; GenJnlTemplate: Record "Gen. Journal Template"; var IsHandled: Boolean)` (integration)
- `OnBeforeIncrementBatchName(var GenJnlBatch: Record "Gen. Journal Batch"; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateCurrencyBalanceForRecurringLine(var GenJnlLine: Record "Gen. Journal Line"; var CurrencyBalance: Decimal; var LastCurrencyCode: Code[10]; var IsHandled: Boolean)` (integration)
- `OnUpdateAndDeleteLinesOnBeforeModifyRecurringLine(var GenJnlLine: Record "Gen. Journal Line")` (integration)
- `OnUpdateAndDeleteLinesOnBeforeDeleteNonRecurringLines(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnPostGenJournalLineOnBeforeCheckDocumentNo(var GenJnlLine: Record "Gen. Journal Line"; GLRegNo: Integer)` (integration)
- `OnUpdateAndDeleteLinesOnAfterModifyRecurringLine(var GenJnlLine: Record "Gen. Journal Line")` (integration)
- `OnUpdateAndDeleteLinesOnBeforeModifyNonRecurringLine(GenJournalTemplate: Record "Gen. Journal Template"; var GenJournalLine: Record "Gen. Journal Line"; LastGenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnUpdateAndDeleteLinesOnAfterModifyNonRecurringLine(GenJournalTemplate: Record "Gen. Journal Template"; var GenJournalLine: Record "Gen. Journal Line"; LastGenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnAfterCalcReversePostingDate(GenJournalLine: Record "Gen. Journal Line"; var PostingDate: Date)` (integration)
- `OnUpdateAndDeleteLinesOnBeforeInBatchName(var GenJnlBatch: Record "Gen. Journal Batch"; var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnUpdateAndDeleteLinesOnBeforeUpdatePostingDate(var GenJnlLine2: Record "Gen. Journal Line")` (integration)
- `OnBeforeCheckLine(var GenJournalLine: Record "Gen. Journal Line"; var PostingAfterWorkingDateConfirmed: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeProcessICLines(var CurrentICPartner: Code[20]; var ICTransactionNo: Integer; var ICLastDocNo: Code[20]; var ICLastDate: Date; var ICLastDocType: Enum "Gen. Journal Document Type"; var GenJournalLine: Record "Gen. Journal Line"; var TempGenJournalLine: Record "Gen. Journal Line" temporary; var ICProccessedLines: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateGenJnlLineWithVATInfo(var GenJournalLine: Record "Gen. Journal Line"; GenJournalLineVATInfoSource: Record "Gen. Journal Line"; StartLineNo: Integer; LastLineNo: Integer; var IsHandled: Boolean)` (integration)
- `OnProcessLinesOnAfterProcessICTransaction(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnCheckLineOnAfterCheckAllocations(GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeCalcReversePostingDate(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeCopyGenJnlLineBalancingData(var IsHandled: Boolean; GenJnlLineTo: Record "Gen. Journal Line"; GenJnlLineFrom: Record "Gen. Journal Line")` (integration)
- `OnBeforeCheckDocumentNo(var GenJournalLine: Record "Gen. Journal Line"; var LastDocumentNo: code[20]; var LastPostedDocumentNo: code[20]; var NoSeriesBatch: Codeunit "No. Series - Batch"; var IsHandled: Boolean)` (integration)
- `OnProcessBalanceOfLinesOnAfterSetVATEntryCreated(GenJournalLine: Record "Gen. Journal Line"; var VATEntryCreated: Boolean)` (integration)
- `OnBeforeCheckAllocations(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnCheckGenJnlLineOnAfterSetPostingDateFilter(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeAssignVATDateIfEmpty(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeFindNextGLRegisterNo(var GLRegister: Record "G/L Register"; var GLRegNo: Integer; var IsHandled: Boolean)` (integration)
- `OnProcessBalanceOfLinesOnBeforeCheckLine(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnPostGenJournalLineOnBeforeMultiplyAmounts(var GenJournalLine: Record "Gen. Journal Line"; SavedPostingDate: Date; SavedVATReportingDate: Date; var PostingGenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnProcessLinesOnAfterPostGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"; CurrentICPartner: Code[20]; ICTransactionNo: Integer; var LastTaxLineNo: Integer)` (integration)
  - subscribers: [Codeunit 6786 "Withholding Tax Jnl Subscriber"](../codeunit/6786.md) OnProcessLinesOnAfterProcessICTransaction
- `OnBeforeFindGenJnlLineOnProcessLines(var GenJournalLine: Record "Gen. Journal Line")` (integration)
  - subscribers: [Codeunit 6786 "Withholding Tax Jnl Subscriber"](../codeunit/6786.md) OnBeforeFindGenJnlLineOnProcessLines

## Procedures

- `UpdateDialog(PostingState: Integer; LineNo: Integer; TotalLinesQty: Integer)`: Updates the posting progress dialog with current posting state and progress information.
- `UpdateDialogUpdateBalLines(PostingSubState: Integer; LineNo: Integer; TotalLinesQty: Integer)`: Updates the posting progress dialog specifically for balance lines update operations.
- `ConfirmPostingUnvoidableChecks(JournalBatchName: Code[20]; JournalTemplateName: Code[20]): Boolean`: Confirms posting of journal lines that require unvoidable validation checks. Specifically validates manual check transactions without balancing accounts and prompts for user confirmation.
- `SetPreviewMode(NewPreviewMode: Boolean)`: Sets the posting batch to preview mode to prevent actual database commits during posting operations. Used for posting preview functionality to analyze posting impacts without permanent changes.
- `Preview(var GenJournalLine: Record "Gen. Journal Line")`
- `PostGenJournalLines(var GenJournalLine: Record "Gen. Journal Line"; CurrGenJnlLine: Record "Gen. Journal Line"; CurrentICPartner: Code[20]; ICTransactionNo: Integer): Boolean` (internal)
- `SetSuppressCommit(NewSuppressCommit: Boolean)`: Controls whether database commits are suppressed during posting operations. Used for testing scenarios or batch operations where commits should be managed externally.
- `InsertPostedGenJnlLine(GenJournalLine: Record "Gen. Journal Line")`: Creates posted general journal line records from successfully posted journal lines. Archives journal line data for audit trail and historical reference if batch is configured for copying.

Plus 66 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 81 "Gen. Journal Line"](../table/81.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 28 "Error Message Management"](../codeunit/28.md) (7 calls: `CheckLine → PopContext`, `CheckLine → PushContext`, `CheckShortcutDimConsistency → Finish`, …)
- [Codeunit 308 "No. Series - Batch"](../codeunit/308.md) (5 calls: `CheckDocumentNo → GetNextNo`, `ProcessBalanceOfLines → GetNextNo`, `ProcessBalanceOfLines → PeekNextNo`, …)
- [Codeunit 11 "Gen. Jnl.-Check Line"](../codeunit/11.md) (4 calls: `CheckLine → RunCheck`, `IsPostingDateAllowed → DateNotAllowed`, `ProcessLines → DateNotAllowed`, …)
- [Codeunit 12 "Gen. Jnl.-Post Line"](../codeunit/12.md) (4 calls: `PostAllocations → RunWithCheck`, `PostGenJournalLine → RunWithoutCheck`, `PostGenJournalLine → SetPreviewMode`, …)
- [Codeunit 427 "ICInboxOutboxMgt"](../codeunit/427.md) (2 calls: `PostGenJournalLine → CreateOutboxJnlLine`, `ProcessICLines → CreateOutboxJnlTransaction`)
- [Codeunit 431 "IC Outbox Export"](../codeunit/431.md) (2 calls: `ProcessICTransaction → ProcessAutoSendOutboxTransactionNo`, `ProcessLines → ProcessAutoSendOutboxTransactionNo`)
- [Codeunit 10 "Type Helper"](../codeunit/10.md) (1 call: `ProcessLines → SortRecordRef`)
- [Codeunit 1431 "Forward Link Mgt."](../codeunit/1431.md) (1 call: `CheckShortcutDimConsistency → GetHelpCodeForTroubleshootingDimensions`)
- [Codeunit 19 "Gen. Jnl.-Post Preview"](../codeunit/19.md) (1 call: `ProcessLines → ThrowError`)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (1 call: `ConfirmPostingUnvoidableChecks → GetResponseOrDefault`)
- [Codeunit 404 "IC Feedback"](../codeunit/404.md) (1 call: `ProcessLines → ShowIntercompanyMessage`)
- [Codeunit 410 "Update Analysis View"](../codeunit/410.md) (1 call: `ProcessLines → UpdateAll`)
- [Codeunit 447 "Record Link Management"](../codeunit/447.md) (1 call: `UpdateAndDeleteLines → RemoveLinks`)
- [Codeunit 48 "PostingSetupManagement"](../codeunit/48.md) (1 call: `CheckLine → ConfirmPostingAfterWorkingDate`)

## Called by

- [Codeunit 231 "Gen. Jnl.-Post"](../codeunit/231.md) (3 calls: `Code → (object)`, `Code → ConfirmPostingUnvoidableChecks`, `Code → SetPreviewMode`)
- [Codeunit 232 "Gen. Jnl.-Post+Print"](../codeunit/232.md) (2 calls: `Code → (object)`, `Code → ConfirmPostingUnvoidableChecks`)
- [Codeunit 980 "Payment Registration Mgt."](../codeunit/980.md) (2 calls: `Post → (object)`, `Post → Preview`)
- [Table 8631 "Config. Table Processing Rule"](../table/8631.md) (2 calls: `RunActionOnGenJnlBatch → (object)`, `RunActionOnGenJnlLine → (object)`)
- [Codeunit 1690 "Bank Deposit-Post"](../codeunit/1690.md) (1 call: `OnRun → (object)`)
- [Codeunit 233 "Gen. Jnl.-B.Post"](../codeunit/233.md) (1 call: `Code → (object)`)
- [Codeunit 234 "Gen. Jnl.-B.Post+Print"](../codeunit/234.md) (1 call: `Code → (object)`)
- [Codeunit 250 "Gen. Jnl.-Post via Job Queue"](../codeunit/250.md) (1 call: `OnRun → (object)`)
- [Codeunit 4037 "Helper Functions"](../codeunit/4037.md) (1 call: `SafePostGLBatch → (object)`)
- [Codeunit 46896 "BC14 Journal Post Action"](../codeunit/46896.md) (1 call: `RunAction → (object)`)
- [Codeunit 47023 "SL Helper Functions"](../codeunit/47023.md) (1 call: `SafePostGLBatch → (object)`)
- [Codeunit 5667 "Post Bank Payment Entry"](../codeunit/5667.md) (1 call: `OnRun → (object)`)
- [Codeunit 6786 "Withholding Tax Jnl Subscriber"](../codeunit/6786.md) (1 call: `OnProcessLinesOnAfterProcessICTransaction → PostGenJournalLines`)
- [Codeunit 7251 "Bank Acc. Rec. Trans. to Acc."](../codeunit/7251.md) (1 call: `PostNewPaymentsToProposedGLAccounts → (object)`)

## Recent changes

- 2026-07-31 [#8959 Deliverable 638799: Spend Requests in Base App](../../changes/bcapps/8959.md) (main, BC30, feature)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC28

## Countries that replace it

[AT](../../localizations/at.md), [AU](../../localizations/au.md), [CH](../../localizations/ch.md), [DE](../../localizations/de.md), [ES](../../localizations/es.md), [NZ](../../localizations/nz.md), [RU](../../localizations/ru.md)

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. Jnl.-Post Batch")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
