---
title: "Codeunit 227 VendEntry-Apply Posted Entries, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/points/
object: https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 227 VendEntry-Apply Posted Entries, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/points/

25 procedures and triggers with a step in src/Layers/W1/BaseApp/Purchases/Payables/VendEntryApplyPostedEntries.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 25](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L25), trigger.

- [30](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L30) calls [Codeunit 9500 Sequence No. Mgt.](https://jonas-paprotka.de/ref/codeunit/9500-sequence-no-mgt/) `SetPreviewMode`
- [34](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L34) calls `Apply`
- [36](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L36) calls `PostUnApplyVendor`
- [40](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L40) calls [Table 98 General Ledger Setup](https://jonas-paprotka.de/ref/table/98-general-ledger-setup/) `GetRecordOnce`
- [50](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L50) calls `Apply`

## Apply

[Line 82](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L82).

- [87](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L87) raises `OnBeforeApply`
- [90](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L90) raises `OnApplyOnBeforePmtTolVend`, IsHandled
- [93](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L93) calls [Codeunit 426 Payment Tolerance Management](https://jonas-paprotka.de/ref/codeunit/426-payment-tolerance-management/) `PmtTolVend`
- [99](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L99) calls `GetApplicationDate`
- [101](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L101) calls `GetApplicationDate`
- [103](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L103) raises `OnApplyOnBeforePostingDateMustNotBeBeforeError`, IsHandled
- [111](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L111) raises `OnApplyOnBeforeVendPostApplyVendLedgEntry`
- [112](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L112) calls `VendPostApplyVendLedgEntry`

## GetApplicationDate

[Line 116](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L116).

- [122](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L122) raises `OnBeforeGetApplicationDate`, IsHandled
- [130](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L130) raises `OnGetApplicationDateOnAfterSetFilters`

## VendPostApplyVendLedgEntry

[Line 138](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L138), local.

- [152](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L152) raises `OnBeforeVendPostApplyVendLedgEntry`, IsHandled
- [172](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L172) calls [Table 81 Gen. Journal Line](https://jonas-paprotka.de/ref/table/81-gen-journal-line/) `CopyVendLedgEntry`
- [179](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L179) calls `FindLastApplDtldVendLedgEntry`
- [181](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L181) raises `OnBeforePostApplyVendLedgEntry`
- [182](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L182) calls [Codeunit 12 Gen. Jnl.-Post Line](https://jonas-paprotka.de/ref/codeunit/12-gen-jnl-post-line/) `VendPostApplyVendLedgEntry`
- [183](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L183) raises `OnAfterPostApplyVendLedgEntry`
- [185](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L185) calls `FindLastApplDtldVendLedgEntry`
- [190](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L190) calls [Codeunit 19 Gen. Jnl.-Post Preview](https://jonas-paprotka.de/ref/codeunit/19-gen-jnl-post-preview/) `ThrowError`
- [193](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L193) raises `OnVendPostApplyVendLedgEntryOnBeforeCommit`
- [198](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L198) calls `RunUpdateAnalysisView`

## RunUpdateAnalysisView

[Line 201](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L201), local.

- [207](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L207) raises `OnBeforeRunUpdateAnalysisView`, IsHandled
- [211](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L211) calls [Codeunit 410 Update Analysis View](https://jonas-paprotka.de/ref/codeunit/410-update-analysis-view/) `UpdateAll`

## FindLastApplDtldVendLedgEntry

[Line 214](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L214), local.

- [219](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L219) calls [Table 380 Detailed Vendor Ledg. Entry](https://jonas-paprotka.de/ref/table/380-detailed-vendor-ledg-entry/) `GetLastEntryNo`

## FindLastApplEntry

[Line 222](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L222).

- [231](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L231) raises `OnFindLastApplEntryOnAfterSetFilters`

## UnApplyDtldVendLedgEntry

[Line 261](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L261).

- [267](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L267) calls `FindLastApplEntry`
- [271](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L271) calls `CheckReversal`
- [272](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L272) calls `UnApplyVendor`

## UnApplyVendLedgEntry

[Line 275](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L275).

- [279](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L279) calls `CheckVendorLedgerEntryToUnapply`
- [280](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L280) calls `UnApplyVendor`

## CheckVendorLedgerEntryToUnapply

[Line 283](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L283).

- [287](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L287) calls `CheckReversal`
- [288](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L288) calls `FindLastApplEntry`

## UnApplyVendor

[Line 294](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L294), local.

- [300](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L300) raises `OnBeforeUnApplyVendor`, IsHandled
- [304](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L304) calls [Page 624 Unapply Vendor Entries](https://jonas-paprotka.de/ref/page/624-unapply-vendor-entries/) `SetDtldVendLedgEntry`
- [309](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L309) raises `OnAfterUnApplyVendor`

## PostUnApplyVendor

[Line 312](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L312).

- [314](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L314) calls `PostUnApplyVendorCommit`

## PostUnApplyVendorCommit

[Line 317](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L317).

- [335](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L335) raises `OnBeforePostUnApplyVendorCommit`, IsHandled
- [346](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L346) raises `OnPostUnApplyVendorOnAfterGetVendLedgEntry`
- [348](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L348) calls `CheckPostingDate`
- [351](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L351) raises `OnPostUnApplyVendorCommitOnBeforePostingDateMustNotBeBeforeError`, IsHandled
- [356](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L356) raises `OnPostUnApplyVendorCommitOnBeforeFilterDtldVendLedgEntry`
- [367](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L367) raises `OnPostUnApplyVendorOnAfterDtldVendLedgEntrySetFilters`
- [371](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L371) calls `CheckAdditionalCurrency`
- [374](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L374) calls `CheckReversal`
- [376](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L376) calls `CheckUnappliedEntries`
- [379](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L379) calls [Table 87 Date Compr. Register](https://jonas-paprotka.de/ref/table/87-date-compr-register/) `CheckMaxDateCompressed`
- [381](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L381) calls [Table 98 General Ledger Setup](https://jonas-paprotka.de/ref/table/98-general-ledger-setup/) `GetRecordOnce`
- [390](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L390) calls [Table 81 Gen. Journal Line](https://jonas-paprotka.de/ref/table/81-gen-journal-line/) `CopyVendLedgEntry`
- [401](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L401) raises `OnBeforePostUnapplyVendLedgEntry`
- [402](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L402) calls `CollectAffectedLedgerEntries`
- [403](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L403) calls [Codeunit 12 Gen. Jnl.-Post Line](https://jonas-paprotka.de/ref/codeunit/12-gen-jnl-post-line/) `UnapplyVendLedgEntry`
- [404](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L404) calls `RunVendExchRateAdjustment`
- [405](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L405) raises `OnAfterPostUnapplyVendLedgEntry`
- [409](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L409) calls [Codeunit 19 Gen. Jnl.-Post Preview](https://jonas-paprotka.de/ref/codeunit/19-gen-jnl-post-preview/) `ThrowError`

## RunVendExchRateAdjustment

[Line 417](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L417), local.

- [423](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L423) raises `OnBeforeRunVendExchRateAdjustment`, IsHandled
- [427](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L427) calls [Codeunit 599 Exch. Rate Adjmt. Run Handler](https://jonas-paprotka.de/ref/codeunit/599-exch-rate-adjmt-run-handler/) `RunVendExchRateAdjustment`

## CheckPostingDate

[Line 430](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L430), local.

- [434](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L434) calls [Codeunit 11 Gen. Jnl.-Check Line](https://jonas-paprotka.de/ref/codeunit/11-gen-jnl-check-line/) `SetGenJnlBatch`
- [435](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L435) calls [Codeunit 11 Gen. Jnl.-Check Line](https://jonas-paprotka.de/ref/codeunit/11-gen-jnl-check-line/) `DateNotAllowed`

## CheckAdditionalCurrency

[Line 442](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L442), local.

- [448](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L448) calls [Table 98 General Ledger Setup](https://jonas-paprotka.de/ref/table/98-general-ledger-setup/) `GetRecordOnce`
- [450](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L450) calls [Table 330 Currency Exchange Rate](https://jonas-paprotka.de/ref/table/330-currency-exchange-rate/) `ExchangeRate`
- [451](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L451) calls [Table 330 Currency Exchange Rate](https://jonas-paprotka.de/ref/table/330-currency-exchange-rate/) `ExchangeRate`

## CheckReversal

[Line 456](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L456).

- [463](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L463) raises `OnAfterCheckReversal`

## ApplyVendEntryFormEntry

[Line 466](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L466).

- [473](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L473) raises `OnBeforeApplyVendEntryFormEntry`, IsHandled
- [480](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L480) raises `OnApplyVendEntryFormEntryOnAfterCheckEntryOpen`
- [492](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L492) raises `OnApplyVendEntryFormEntryOnBeforeRunVendEntryEdit`
- [493](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L493) runs [Codeunit 113 Vend. Entry-Edit](https://jonas-paprotka.de/ref/codeunit/113-vend-entry-edit/)
- [499](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L499) calls `RunApplyVendEntries`

## RunApplyVendEntries

[Line 502](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L502), local.

- [508](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L508) raises `OnApplyVendEntryFormEntryOnAfterVendLedgEntrySetFilters`, IsHandled
- [513](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L513) calls [Page 233 Apply Vendor Entries](https://jonas-paprotka.de/ref/page/233-apply-vendor-entries/) `SetVendLedgEntry`
- [517](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L517) calls [Page 233 Apply Vendor Entries](https://jonas-paprotka.de/ref/page/233-apply-vendor-entries/) `SetAppliesToID`

## CollectAffectedLedgerEntries

[Line 526](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L526), local.

- [530](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L530) writes [Table 25 Vendor Ledger Entry](https://jonas-paprotka.de/ref/table/25-vendor-ledger-entry/) DeleteAll
- [542](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L542) raises `OnCollectAffectedLedgerEntriesOnAfterSetFilters`
- [546](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L546) writes [Table 25 Vendor Ledger Entry](https://jonas-paprotka.de/ref/table/25-vendor-ledger-entry/) Insert

## PreviewApply

[Line 567](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L567).

- [573](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L573) calls [Codeunit 426 Payment Tolerance Management](https://jonas-paprotka.de/ref/codeunit/426-payment-tolerance-management/) `PmtTolVend`
- [577](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L577) calls [Codeunit 227 VendEntry-Apply Posted Entries](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/) `SetApplyContext`
- [578](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L578) calls [Codeunit 19 Gen. Jnl.-Post Preview](https://jonas-paprotka.de/ref/codeunit/19-gen-jnl-post-preview/) `Preview`

## PreviewUnapply

[Line 581](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L581).

- [588](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L588) calls [Codeunit 227 VendEntry-Apply Posted Entries](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/) `SetUnapplyContext`
- [589](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L589) calls [Codeunit 19 Gen. Jnl.-Post Preview](https://jonas-paprotka.de/ref/codeunit/19-gen-jnl-post-preview/) `Preview`

## GetAppliedVendLedgerEntries

[Line 605](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L605).

- [632](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L632) writes [Table 25 Vendor Ledger Entry](https://jonas-paprotka.de/ref/table/25-vendor-ledger-entry/) Insert
- [638](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L638) writes [Table 25 Vendor Ledger Entry](https://jonas-paprotka.de/ref/table/25-vendor-ledger-entry/) Insert

## CheckUnappliedEntries

[Line 643](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L643), local.

- [649](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L649) calls `FindLastApplTransactionEntry`
- [651](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L651) raises `OnCheckUnappliedEntriesOnBeforeUnapplyAllEntriesError`, IsHandled
- [656](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L656) calls `FindLastTransactionNo`

## OnRunPreview

[Line 662](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L662), local.

- [668](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/source/#L668) runs [Codeunit 227 VendEntry-Apply Posted Entries](https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/)

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
