---
id: object/codeunit/367
type: object
title: Codeunit 367 "CheckManagement"
summary: Codeunit 367 "CheckManagement" in Base Application (Microsoft.Bank.Check). 5 public procedures, 40 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24-26, 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: b218b80ffe01351acbbc84668811578d071d6f070109bafaf29ff959593005d7
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Bank/Check/CheckManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Bank/Check/CheckManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/au
    - localization/ca
    - localization/mx
    - localization/nz
    - localization/ru
    - localization/us
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9841
    - change/bcapps/9421
object_type: codeunit
object_id: 367
name: CheckManagement
namespace: Microsoft.Bank.Check
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"
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries:
  - au
  - ca
  - mx
  - nz
  - ru
  - us
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 64
  events: 40
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 6
  called_by: 1
  implements: 0
---

# Codeunit 367 "CheckManagement"

> Codeunit 367 "CheckManagement" in Base Application (Microsoft.Bank.Check). 5 public procedures, 40 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24-26, BC28.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Cust. Ledger Entry" = rm, TableData "Vendor Ledger Entry" = rm, TableData "Bank Account Ledger Entry" = rm, TableData "Check Ledger Entry" = rim, TableData "Employee Ledger Entry" = rm |

## Events published

- `OnAfterCalcAmountToVoid(var CheckLedgerEntry: Record "Check Ledger Entry"; var AmountToVoid: Decimal)` (integration): Integration event raised after calculating the total amount to void for a check. Enables custom calculation logic or adjustments to the void amount.
- `OnAfterVoidCheck(var GenJnlLine: Record "Gen. Journal Line"; var CheckLedgerEntry: Record "Check Ledger Entry")` (integration): Integration event raised after successfully voiding a check entry. Enables custom processing or logging after the void operation completes.
- `OnAfterFinancialVoidCheck(var CheckLedgerEntry: Record "Check Ledger Entry")` (integration): Integration event raised after completing a financial void operation on a check. Enables custom processing or notifications after the check has been financially voided.
- `OnAfterFinancialVoidCheckPreValidation(CheckLedgerEntry: Record "Check Ledger Entry"; BankAccountLedgerEntry: Record "Bank Account Ledger Entry")` (integration): Integration event raised after validating prerequisites for financial void operation. Enables additional validation or processing after standard void validation completes.
- `OnBeforeVoidCheck(var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration): Integration event raised before starting a check void operation. Enables custom validation or processing before the void operation begins.
- `OnBeforeMarkCheckEntriesVoid(var OriginalCheckLedgerEntry: Record "Check Ledger Entry"; VoidDate: Date; var IsHandled: Boolean)` (integration): Integration event raised before marking check ledger entries as void. Enables custom logic for handling check entry void marking.
- `OnBeforeFinancialVoidCheck(var CheckLedgerEntry: Record "Check Ledger Entry"; var IsHandled: Boolean)` (integration): Integration event raised before starting a financial void operation on a check. Enables custom validation or alternative void processing.
- `OnBeforeVoidCheckGenJnlLine2Modify(var GenJournalLine2: Record "Gen. Journal Line"; GenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised before modifying a general journal line during check void operation. Enables custom field updates or validation before journal line modification.
- `OnMarkCheckEntriesVoidOnBeforeRelatedCheckLedgerEntry2Modify(var CheckLedgerEntry: Record "Check Ledger Entry"; var VoidDate: Date)` (integration): Integration event raised before modifying related check ledger entries during void operation. Enables custom processing of related check entries before they are marked as voided.
- `OnMarkCheckEntriesVoidOnBeforeOriginalCheckLedgerEntryModify(var CheckLedgerEntry: Record "Check Ledger Entry"; var VoidDate: Date)` (integration): Integration event raised before modifying the original check ledger entry during void operation. Enables custom field updates or validation before the original check entry is marked as voided.
- `OnVoidCheckOnAfterGenJnlLine2Modify(var GenJournalLine2: Record "Gen. Journal Line"; GenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised after modifying a general journal line during check void operation. Enables custom processing or logging after journal line has been updated with void status.
- `OnVoidCheckOnAfterCheckLedgEntry2SetFilters(var CheckLedgerEntry: Record "Check Ledger Entry"; GenJournalLine: Record "Gen. Journal Line")` (integration): Integration event raised after setting filters on check ledger entry during void operation. Enables custom filter modification or additional processing on filtered check entries.
- `OnFinancialVoidCheckOnBeforePostCust(var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var BalanceAmountLCY: Decimal)` (integration): Integration event raised before posting customer entries during financial void operation. Enables custom processing or validation before customer ledger entries are posted.
- `OnFinancialVoidCheckOnBeforeCheckBalAccountType(var GenJournalLine: Record "Gen. Journal Line"; var CheckLedgerEntry: Record "Check Ledger Entry"; var BankAccountLedgerEntry: Record "Bank Account Ledger Entry"; var BalanceAmountLCY: Decimal; var IsHandled: Boolean)` (integration): Integration event raised before checking balance account type during financial void operation. Enables custom validation or processing based on the balance account type.
- `OnFinancialVoidCheckOnBeforePostBankAccount(var GenJournalLine: Record "Gen. Journal Line"; var BankAccountLedgerEntry: Record "Bank Account Ledger Entry")` (integration): Integration event raised before posting bank account entries during financial void operation. Enables custom processing or validation before bank account ledger entries are posted.
- `OnFinancialVoidCheckOnBeforePostFixedAsset(var GenJournalLine: Record "Gen. Journal Line"; var FALedgerEntry: Record "FA Ledger Entry")` (integration): Integration event raised before posting fixed asset entries during financial void operation. Enables custom processing or validation before fixed asset ledger entries are posted.
- `OnFinancialVoidCheckOnBeforePostVend(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var BalanceAmountLCY: Decimal)` (integration): Integration event raised before posting vendor entries during financial void operation. Enables custom processing or validation before vendor ledger entries are posted.
- `OnFinancialVoidCheckOnBeforePostEmp(var GenJournalLine: Record "Gen. Journal Line"; var EmployeeLedgerEntry: Record "Employee Ledger Entry")` (integration): Integration event raised before posting employee entries during financial void operation. Enables custom processing or validation before employee ledger entries are posted.
- `OnFinancialVoidCheckOnAfterPostVoidCheckLine(var GenJournalLine: Record "Gen. Journal Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration): Integration event raised after posting a void check line during financial void operation. Enables custom processing or logging after void entries are posted.
- `OnFinancialVoidCheckOnAfterVendorLedgEntrySetFilters(var VendorLedgEntry: Record "Vendor Ledger Entry"; BankAccLedgEntry: Record "Bank Account Ledger Entry")` (integration): Integration event raised after setting filters on vendor ledger entries during financial void operation. Enables custom filter modification or additional processing on filtered vendor entries.
- `OnFinancialVoidCheckOnBeforePostVoidCheckLine(var GenJournalLine: Record "Gen. Journal Line"; var CheckLedgEntry: Record "Check Ledger Entry"; var BankAccLedgEntry2: Record "Bank Account Ledger Entry")` (integration): Integration event raised before posting a void check line during financial void operation. Enables custom processing or validation before void entries are posted.
- `OnFinancialVoidCheckOnAfterPostBalAccLine(var GenJournalLine: Record "Gen. Journal Line"; CheckLedgerEntry: Record "Check Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration): Integration event raised after posting balance account line during financial void operation. Enables custom processing or logging after balance account entries are posted.
- `OnFinancialVoidCheckOnBeforePostBalAccLine(var GenJournalLine: Record "Gen. Journal Line"; CheckLedgerEntry: Record "Check Ledger Entry")` (integration): Integration event raised before posting balance account line during financial void operation. Enables custom processing or validation before balance account entries are posted.
- `OnFinancialVoidPostGLAccountOnBeforeGLEntryLoop(var GLEntry: Record "G/L Entry"; var CheckLedgerEntry: Record "Check Ledger Entry")` (integration): Integration event raised before processing G/L entries loop during financial void of G/L account. Enables custom processing or filtering of G/L entries before void operation.
- `OnInsertCheckOnAfterCheckLedgEntryInsert(var CheckLedgEntry: Record "Check Ledger Entry")` (integration): Integration event raised after inserting a new check ledger entry. Enables custom processing or additional field updates after check entry creation.
- `OnInsertCheckOnBeforeCheckLedgEntryInsert(var CheckLedgEntry: Record "Check Ledger Entry")` (integration): Integration event raised before inserting a new check ledger entry. Enables custom field updates or validation before check entry creation.
- `OnPostRoundingAmountOnAfterGenJnlPostLine(var GenJournalLine: Record "Gen. Journal Line"; CheckLedgerEntry: Record "Check Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration): Integration event raised after posting rounding amount entries during financial void operation. Enables custom processing or logging after currency rounding entries are posted.
- `OnProcessElectronicPaymentOnBeforeCheckLedgEntry3Modify(var CheckLedgerEntry: Record "Check Ledger Entry"; var WhichProcess: Option)` (integration): Integration event raised before modifying check ledger entry during electronic payment processing. Enables custom field updates or validation before electronic payment status changes.
- `OnPostRoundingAmountOnBeforeGenJnlPostLine(var GenJournalLine: Record "Gen. Journal Line"; CheckLedgerEntry: Record "Check Ledger Entry"; var BankAccountLedgerEntry: Record "Bank Account Ledger Entry")` (integration): Integration event raised before posting rounding amount entries during financial void operation. Enables custom processing or validation before currency rounding entries are posted.
- `OnUnApplyCustInvoicesOnBeforePost(var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry")` (integration): Integration event raised before posting unapplication entries for customer invoices during void operation. Enables custom processing or validation before customer unapplication entries are posted.
- `OnUnApplyVendInvoicesOnBeforePost(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry")` (integration): Integration event raised before posting unapplication entries for vendor invoices during void operation. Enables custom processing or validation before vendor unapplication entries are posted.
- `OnAfterIsElectronicBankPaymentType(BankPaymenType: Enum "Bank Payment Type"; var IsElectronicPaymentType: Boolean)` (integration): Integration event raised after determining if a bank payment type is electronic. Enables custom logic for identifying electronic payment types.
- `OnUnApplyCustInvoicesOnAfterCalcRemainingAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")` (integration): Integration event raised after calculating remaining amount for customer entries during void operation. Enables custom processing or adjustments after remaining amount calculation for customer ledger entries.
- `OnUnApplyVendInvoicesOnAfterCalcRemainingAmount(var VendorLedgerEntry: Record "Vendor Ledger Entry")` (integration): Integration event raised after calculating remaining amount for vendor entries during void operation. Enables custom processing or adjustments after remaining amount calculation for vendor ledger entries.
- `OnUnApplyVendInvoicesOnBeforeErrorNoAppliedEntry(var BankAccLedgEntry: Record "Bank Account Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration): Integration event raised before showing error for missing applied entries during vendor invoice unapplication. Enables custom error handling or alternative processing when no applied entries are found.
- `OnBeforeSetGenJnlLine(var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration): Integration event raised before setting general journal line fields during check operations. Enables custom field updates or validation before journal line field assignment.
- `OnAfterSetGenJnlLine(var GenJnlLine: Record "Gen. Journal Line")` (integration): Integration event raised after setting general journal line fields during check operations. Enables custom field updates or additional processing after journal line field assignment.
- `OnBeforeUnApplyVendInvoices(var CheckLedgEntry: Record "Check Ledger Entry"; var VoidDate: Date; var IsHandled: Boolean; var Result: Boolean)` (integration): Integration event raised before starting vendor invoice unapplication during void operation. Enables custom logic for handling vendor invoice unapplication or skipping standard processing.
- `OnFinancialVoidCheckOnBeforeConfirmFinancialVoid(var CheckLedgEntry: Record "Check Ledger Entry"; var IsHandled: Boolean)` (integration): Integration event raised before confirming financial void operation on a check. Enables custom confirmation dialog or validation before financial void confirmation.
- `OnBeforePostRoundingAmount(var BankAcc: Record "Bank Account"; var CheckLedgEntry: Record "Check Ledger Entry"; BankAccLedgEntry2: Record "Bank Account Ledger Entry"; var PostingDate: Date; var RoundingAmount: Decimal; var IsHandled: Boolean)` (integration): Integration event raised before posting rounding amount during financial void operation. Enables custom processing or validation before currency rounding entries are posted.

## Event subscriptions

- CleanRecordIDToPrintOnAfterDeleteEventGenJournalLine subscribes to Table "Gen. Journal Line" OnAfterDeleteEvent

## Procedures

- `InsertCheck(var CheckLedgEntry: Record "Check Ledger Entry"; RecordIdToPrint: RecordID)`: Creates a new check ledger entry with sequential numbering and duplicate validation. Validates check number uniqueness within the bank account before insertion.
- `VoidCheck(var GenJnlLine: Record "Gen. Journal Line")`: Voids a check by creating reversing entries and updating check ledger entry status. Handles currency conversion and validates payment document types.
- `FinancialVoidCheck(var CheckLedgEntry: Record "Check Ledger Entry")`: Performs financial voiding of a posted check by creating offsetting journal entries. Unapplies vendor/customer invoices and reverses all financial impacts while maintaining audit trail.
- `GenJournalLineGetSystemIdFromRecordId(GenJournalLineRecordId: RecordId): Guid`
- `ProcessElectronicPayment(var GenJournalLine: Record "Gen. Journal Line"; WhichProcess: Option ,Void,Transmit)`: Processes electronic payment transmission or voiding based on specified operation type. Manages electronic payment status updates and data exchange integration.

Plus 18 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 12 "Gen. Jnl.-Post Line"](../codeunit/12.md) (6 calls: `FinancialVoidCheck → RunWithCheck`, `FinancialVoidPostGLAccount → RunWithCheck`, `PostRoundingAmount → RunWithCheck`, …)
- [Codeunit 101 "Cust. Entry-SetAppl.ID"](../codeunit/101.md) (1 call: `ClearApplnCustLedgerEntries → SetApplId`)
- [Codeunit 111 "Vend. Entry-SetAppl.ID"](../codeunit/111.md) (1 call: `ClearApplnVendorLedgerEntries → SetApplId`)
- [Codeunit 112 "Empl. Entry-SetAppl.ID"](../codeunit/112.md) (1 call: `ClearApplnEmployeeLedgerEntries → SetApplId`)
- [Codeunit 16 "Gen. Jnl.-Show CT Entries"](../codeunit/16.md) (1 call: `RemoveCreditTransfers → SetFiltersOnCreditTransferEntry`)
- [Codeunit 410 "Update Analysis View"](../codeunit/410.md) (1 call: `FinancialVoidCheck → UpdateAll`)

## Called by

- [Codeunit 104000 "Upgrade - BaseApp"](../codeunit/104000.md) (1 call: `CheckLedgerEntriesMoveFromRecordIDToSystemId → GenJournalLineGetSystemIdFromRecordId`)

## Recent changes

- 2026-07-31 [#9841 Indent the case block under the IsHandled guard](../../changes/bcapps/9841.md) (main, BC30, refactor)
- 2026-07-27 [#9421 [Event Request] codeunit 367 "CheckManagement": add OnFinancialVoidCh…](../../changes/bcapps/9421.md) (main, BC30, feature)

## Across versions

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

## Countries that replace it

[AU](../../localizations/au.md), [CA](../../localizations/ca.md), [MX](../../localizations/mx.md), [NZ](../../localizations/nz.md), [RU](../../localizations/ru.md), [US](../../localizations/us.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: "CheckManagement")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
