Codeunit 226 "CustEntry-Apply Posted Entries"
Base Application · Microsoft.Sales.Receivables
Across versions
- BC23present
- BC241 events added, 1 events removed
- BC25-26unchanged
- BC271 events added
- BC28-30unchanged
Neighbourhood 14 connected objects and pages
Base Application · Microsoft.Sales.Receivables · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Cust. Ledger Entry |
| Permissions | TableData “Cust. Ledger Entry” = rimd |
Events published
OnAfterCheckReversal(CustLedgerEntry: Record "Cust. Ledger Entry")(integration): Raised after checking if a customer ledger entry is part of a reversal.OnAfterPostApplyCustLedgEntry(GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")(integration): Raised after posting the application of a customer ledger entry.OnAfterPostUnapplyCustLedgEntry(GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry"; DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var CommitChanges: Boolean; var TempCustLedgerEntry: Record "Cust. Ledger Entry" temporary)(integration): Raised after posting the unapplication of a customer ledger entry.OnAfterUnApplyCustomer(DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry")(integration): Raised after unapplying a customer ledger entry through the UI.OnApplyCustEntryFormEntryOnAfterCheckEntryOpen(ApplyingCustLedgEntry: Record "Cust. Ledger Entry")(integration): Raised after checking that the entry is open in the apply customer entry form.OnApplyCustEntryFormEntryOnBeforeRunCustEntryEdit(var ApplyingCustLedgEntry: Record "Cust. Ledger Entry")(integration): Raised before running customer entry edit in the apply customer entry form.OnApplyApplyCustEntryFormEntryOnAfterCustLedgEntrySetFilters(var CustLedgerEntry: Record "Cust. Ledger Entry"; var ApplyingCustLedgerEntry: Record "Cust. Ledger Entry" temporary; var IsHandled: Boolean; var CustEntryApplID: Code[50])+ BC24 − BC24 (integration): Raised after filters have been set on customer ledger entries in the apply form.OnBeforeApply(var CustLedgerEntry: Record "Cust. Ledger Entry"; var DocumentNo: Code[20]; var ApplicationDate: Date)(integration): Raised before applying a customer ledger entry.OnBeforeApplyCustEntryFormEntry(var ApplyingCustLedgEntry: Record "Cust. Ledger Entry"; var IsHandled: Boolean)(integration): Raised before opening the apply customer entry form.OnBeforeGetApplicationDate(CustLedgEntry: Record "Cust. Ledger Entry"; var ApplicationDate: Date; var IsHandled: Boolean)(integration): Raised before getting the application date.OnBeforePostApplyCustLedgEntry(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; ApplyUnapplyParameters: Record "Apply Unapply Parameters")(integration): Raised before posting the application of a customer ledger entry.OnBeforePostUnapplyCustLedgEntry(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry"; DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; ApplyUnapplyParameters: Record "Apply Unapply Parameters")(integration): Raised before posting the unapplication of a customer ledger entry.OnCollectAffectedLedgerEntriesOnAfterSetFilters(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; DetailedCustLedgEntry2: Record "Detailed Cust. Ledg. Entry")(integration): Raised after filters have been set when collecting affected ledger entries.OnFindLastApplEntryOnAfterSetFilters(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry")(integration): Raised after filters have been set when finding the last application entry.OnBeforeCustPostApplyCustLedgEntry(var HideProgressWindow: Boolean; CustLedgEntry: Record "Cust. Ledger Entry"; var IsHandled: Boolean)(integration): Raised before posting the customer application.OnGetApplicationDateOnAfterSetFilters(var ApplyToCustLedgEntry: Record "Cust. Ledger Entry"; CustLedgEntry: Record "Cust. Ledger Entry")(integration): Raised after filters have been set when getting the application date.OnBeforeRunUpdateAnalysisView(var IsHandled: Boolean)(integration): Raised before running the update analysis view.OnBeforeRunCustExchRateAdjustment(var GenJnlLine: Record "Gen. Journal Line"; var TempCustLedgerEntry: Record "Cust. Ledger Entry" temporary; var IsHandled: Boolean)(integration): Raised before running the customer exchange rate adjustment.OnBeforePostUnApplyCustomerCommit(var HideProgressWindow: Boolean; PreviewMode: Boolean; DetailedCustLedgEntry2: Record "Detailed Cust. Ledg. Entry"; DocNo: Code[20]; PostingDate: Date; CommitChanges: Boolean; var IsHandled: Boolean)(integration): Raised before posting the unapplication with commit control.OnCheckUnappliedEntriesOnBeforeUnapplyAllEntriesError(DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; LastTransactionNo: Integer; var IsHandled: Boolean)(integration): Raised before raising the unapply all entries error.OnCustPostApplyCustLedgEntryOnBeforeCommit(var CustLedgerEntry: Record "Cust. Ledger Entry"; var SuppressCommit: Boolean)(integration): Raised before committing the customer application posting.OnBeforeUnApplyCustomer(DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var IsHandled: Boolean)(integration): Raised before unapplying a customer entry through the UI.OnPostUnApplyCustomerCommitOnAfterSetFilters(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; DetailedCustLedgEntry2: Record "Detailed Cust. Ledg. Entry")(integration): Raised after filters have been set during unapplication posting.OnPostUnApplyCustomerCommitOnAfterGetCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry")(integration): Raised after getting the customer ledger entry during unapplication.OnApplyOnBeforePmtTolCust(CustLedgEntry: Record "Cust. Ledger Entry"; var PaymentToleranceMgt: Codeunit "Payment Tolerance Management"; PreviewMode: Boolean; var IsHandled: Boolean)(integration): Raised before processing payment tolerance during application.OnApplyOnBeforeCustPostApplyCustLedgEntry(CustLedgerEntry: Record "Cust. Ledger Entry"; var ApplyUnapplyParameters: Record "Apply Unapply Parameters")(integration): Raised before posting the customer ledger entry application.OnPostUnApplyCustomerCommitOnBeforeFilterDtldCustLedgEntry(DetailedCustLedgEntry2: Record "Detailed Cust. Ledg. Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters")(integration): Raised before filtering detailed customer ledger entries during unapplication.OnPostUnApplyCustomerCommitOnAfterPreviewMode(CustLedgerEntry: Record "Cust. Ledger Entry")+ BC27 (integration): Raised after preview mode processing during unapplication.
Event subscriptions
- OnRunPreview subscribes to Codeunit “Gen. Jnl.-Post Preview” OnRunPreview
Procedures
Apply(CustLedgEntry: Record "Cust. Ledger Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters"): Boolean: Applies the customer ledger entry based on the specified application parameters.GetApplicationDate(CustLedgEntry: Record "Cust. Ledger Entry"): Date: Gets the latest posting date among all customer ledger entries with the same Applies-to ID.FindLastApplEntry(CustLedgEntryNo: Integer): Integer: Finds the last application entry number for the specified customer ledger entry.UnApplyDtldCustLedgEntry(DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"): Unapplies the specified detailed customer ledger entry if it is the last application entry.CheckCustLedgEntryToUnapply(CustLedgEntryNo: Integer; var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"): Validates that the customer ledger entry can be unapplied and retrieves the last application entry.UnApplyCustLedgEntry(CustLedgEntryNo: Integer): Unapplies the customer ledger entry by its entry number.PostUnApplyCustomer(DtldCustLedgEntry2: Record "Detailed Cust. Ledg. Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters"): Posts the unapplication of a customer ledger entry with automatic commit.PostUnApplyCustomerCommit(DtldCustLedgEntry2: Record "Detailed Cust. Ledg. Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters"; CommitChanges: Boolean): Posts the unapplication of a customer ledger entry with optional commit control.CheckReversal(CustLedgEntryNo: Integer): Checks whether the customer ledger entry is part of a reversal and raises an error if it is.ApplyCustEntryFormEntry(var ApplyingCustLedgEntry: Record "Cust. Ledger Entry"): Opens the Apply Customer Entries page to allow the user to select entries for application.PreviewApply(CustLedgEntry: Record "Cust. Ledger Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters"): Previews the application of a customer ledger entry without posting.PreviewUnapply(DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters"): Previews the unapplication of a detailed customer ledger entry without posting.SetApplyContext(ApplyUnapplyParameters: Record "Apply Unapply Parameters"): Sets the context for an application preview operation.SetUnapplyContext(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; ApplyUnapplyParameters: Record "Apply Unapply Parameters"): Sets the context for an unapplication preview operation.GetAppliedCustLedgerEntries(var TempAppliedCustLedgerEntry: Record "Cust. Ledger Entry" temporary; CustLedgerEntryNo: Integer): Retrieves all customer ledger entries that have been applied to the specified entry.
Plus 12 local procedures.
Triggers
OnRun
Relations
- runs on Table 21 “Cust. Ledger Entry”
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 19 “Gen. Jnl.-Post Preview” (4 calls:
CustPostApplyCustLedgEntry → ThrowError,PostUnApplyCustomerCommit → ThrowError,PreviewApply → Preview, …) - Codeunit 11 “Gen. Jnl.-Check Line” (2 calls:
CheckPostingDate → DateNotAllowed,CheckPostingDate → SetGenJnlBatch) - Codeunit 12 “Gen. Jnl.-Post Line” (2 calls:
CustPostApplyCustLedgEntry → CustPostApplyCustLedgEntry,PostUnApplyCustomerCommit → UnapplyCustLedgEntry) - Codeunit 426 “Payment Tolerance Management” (2 calls:
Apply → PmtTolCust,PreviewApply → PmtTolCust) - Codeunit 103 “Cust. Entry-Edit” (1 call:
ApplyCustEntryFormEntry → (object)) - Codeunit 410 “Update Analysis View” (1 call:
RunUpdateAnalysisView → UpdateAll) - Codeunit 599 “Exch. Rate Adjmt. Run Handler” (1 call:
RunCustExchRateAdjustment → RunCustExchRateAdjustment) - Codeunit 9500 “Sequence No. Mgt.” (1 call:
OnRun → SetPreviewMode)
Called by
- Codeunit 386 “Reverse Payment Rec. Journal” (3 calls:
UnapplyCustomerEntry → CheckCustLedgEntryToUnapply,UnapplyCustomerEntry → PostUnApplyCustomer,UnapplyCustomerEntry → UnApplyCustLedgEntry) - Page 232 “Apply Customer Entries” (3 calls:
PostDirectApplication → Apply,PostDirectApplication → GetApplicationDate,PostDirectApplication → PreviewApply) - Page 5939 “Serv. Apply Customer Entries” (3 calls:
PostDirectApplication → Apply,PostDirectApplication → GetApplicationDate,PostDirectApplication → PreviewApply) - Codeunit 1339 “Cancel Posted Sales Cr. Memo” (1 call:
UnapplyEntries → PostUnApplyCustomer) - Codeunit 5280 “SAF-T Data Mgt.” (1 call:
GetAppliedSalesDocuments → GetAppliedCustLedgerEntries)
Countries that replace it
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: "CustEntry-Apply Posted Entries"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.