---
id: object/codeunit/103
type: object
title: Codeunit 103 "Cust. Entry-Edit"
summary: Codeunit 103 "Cust. Entry-Edit" in Base Application (Microsoft.Sales.Receivables). 2 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC24, 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: 389428efa9ce4e5edc60b3e2690cf3c1f3e59544431e8e0099d08c9991ef17d5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Receivables/CustEntryEdit.Codeunit.al
    title: src/Layers/W1/BaseApp/Sales/Receivables/CustEntryEdit.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/au
    - localization/it
    - localization/nz
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11160
object_type: codeunit
object_id: 103
name: Cust. Entry-Edit
namespace: Microsoft.Sales.Receivables
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "27"
source_major: "29"
obsolete: null
countries:
  - au
  - it
  - nz
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 9
  events: 5
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 18
  implements: 0
---

# Codeunit 103 "Cust. Entry-Edit"

> Codeunit 103 "Cust. Entry-Edit" in Base Application (Microsoft.Sales.Receivables). 2 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC24, BC27.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Cust. Ledger Entry |
| Permissions | TableData "Cust. Ledger Entry" = m, TableData "Detailed Cust. Ledg. Entry" = m, tabledata "Sales Invoice Header" = m |

## Events published

- `OnBeforeCustLedgEntryModify(var CustLedgEntry: Record "Cust. Ledger Entry"; FromCustLedgEntry: Record "Cust. Ledger Entry")` (integration): Raised before the customer ledger entry is modified.
- `OnBeforeOnRun(var CustLedgerEntryRec: Record "Cust. Ledger Entry"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var IsHandled: Boolean)` (integration): Raised before the OnRun trigger executes to allow custom processing.
- `OnRunOnAfterCustLedgEntryModify(var CustLedgerEntryRec: Record "Cust. Ledger Entry"; var CustLedgerEntry: Record "Cust. Ledger Entry")` (integration): Raised after the customer ledger entry has been modified.
- `OnAfterLogFieldChanged(CurrCustLedgerEntry: Record "Cust. Ledger Entry"; NewCustLedgerEntry: Record "Cust. Ledger Entry"; var Changed: Boolean)` (integration): Raised after determining if fields have changed to allow additional change tracking.
- `OnBeforeUpdateSalesInvoiceHeader(var UpdateSalesInvoiceCustLedgerEntry: Record "Cust. Ledger Entry"; CalledFromSalesInvEdit: Boolean; var IsHandled: Boolean)` (integration): Raised before updating the sales invoice header with customer ledger entry changes.

## Procedures

- `SetOnHold(var OnHoldCustLedgEntry: Record "Cust. Ledger Entry"; NewOnHold: Code[3])`: Sets the On Hold status of a customer ledger entry.
- `SetCalledFromSalesInvoice(CalledFromSalesInvEditSet: Boolean)`: Sets a flag indicating whether the codeunit is called from a sales invoice edit operation.

Plus 2 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 21 "Cust. Ledger Entry"](../table/21.md)

## Called by

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 980 "Payment Registration Mgt."](../codeunit/980.md) (3 calls: `ClearApplicationFieldsOnCustLedgerEntry → (object)`, `UpdateApplicationFieldsOnCustLedgerEntry → (object)`, `UpdatePmtDiscountDateOnCustLedgerEntry → (object)`)
- [Page 232 "Apply Customer Entries"](../page/232.md) (3 calls: `OnModifyRecord → (object)`, `OnQueryClosePage → (object)`, `SetApplyingCustledgEntryDirect → (object)`)
- [Table 81 "Gen. Journal Line"](../table/81.md) (3 calls: `ClearCustVendApplnEntry → (object)`, `RenumberAppliesToID → (object)`, `SetApplyToAmount → (object)`)
- [Codeunit 1409 "Sales Inv. Header - Edit"](../codeunit/1409.md) (2 calls: `UpdateCustLedgerEntry → (object)`, `UpdateCustLedgerEntry → SetCalledFromSalesInvoice`)
- [Codeunit 370 "Bank Acc. Reconciliation Post"](../codeunit/370.md) (2 calls: `ApplyCustLedgEntry → (object)`, `CustEntryEditNoCommit → (object)`)
- [Page 5939 "Serv. Apply Customer Entries"](../page/5939.md) (2 calls: `OnModifyRecord → (object)`, `OnQueryClosePage → (object)`)
- [Codeunit 108 "Net Cust/Vend Balances Mgt."](../codeunit/108.md) (1 call: `SetOnHold → SetOnHold`)
- [Codeunit 1208 "Pmt Export Mgt Cust Ledg Entry"](../codeunit/1208.md) (1 call: `SetExportFlagOnCustLedgerEntries → (object)`)
- [Codeunit 1250 "Match General Journal Lines"](../codeunit/1250.md) (1 call: `PrepareCustLedgerEntryForApplication → (object)`)
- [Codeunit 1255 "Match Bank Payments"](../codeunit/1255.md) (1 call: `SetCustAppicationData → (object)`)
- [Codeunit 1278 "Exp. User Feedback Gen. Jnl."](../codeunit/1278.md) (1 call: `SetExportFlagOnAppliedCustLedgerEntry → (object)`)
- [Codeunit 1408 "Sales Credit Memo Hdr. - Edit"](../codeunit/1408.md) (1 call: `UpdateCustLedgerEntry → (object)`)
- [Codeunit 20111 "AMC Bank Exp. CT Feedback"](../codeunit/20111.md) (1 call: `SetExportFlagOnAppliedCustLedgerEntry → (object)`)
- [Codeunit 226 "CustEntry-Apply Posted Entries"](../codeunit/226.md) (1 call: `ApplyCustEntryFormEntry → (object)`)
- [Codeunit 6620 "Copy Document Mgt."](../codeunit/6620.md) (1 call: `UpdateCustLedgerEntry → (object)`)
- [Page 25 "Customer Ledger Entries"](../page/25.md) (1 call: `OnModifyRecord → (object)`)
- [Table 1294 "Applied Payment Entry"](../table/1294.md) (1 call: `ClearCustApplicationData → (object)`)
- [Table 21 "Cust. Ledger Entry"](../table/21.md) (1 call: `SetAmountToApply → (object)`)

## Recent changes

- 2026-09-09 [#11160 Ruleset hardening: promote three mechanical rules to Error](../../changes/bcapps/11160.md) (main, BC30, refactor)

## Across versions

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

## Countries that replace it

[AU](../../localizations/au.md), [IT](../../localizations/it.md), [NZ](../../localizations/nz.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: "Cust. Entry-Edit")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
