---
title: "Codeunit 827 Service Post Invoice Events, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/points/
object: https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/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 827 Service Post Invoice Events, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/points/

26 procedures and triggers with a step in src/Layers/W1/BaseApp/Service/Posting/ServicePostInvoiceEvents.Codeunit.al, in source order, read from the text, not from a run.

## RunOnAfterUpdateInvoicePostingBuffer

[Line 18](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L18).

- [20](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L20) raises `OnAfterUpdateInvoicePostingBuffer`

## RunOnAfterGetSalesAccount

[Line 28](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L28).

- [30](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L30) raises `OnAfterGetSalesAccount`

## RunOnAfterPrepareGenJnlLineFromInvoicePostBuffer

[Line 38](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L38).

- [40](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L40) raises `OnAfterPrepareGenJnlLineFromInvoicePostBuffer`

## RunOnBeforePrepareLine

[Line 50](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L50).

- [52](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L52) raises `OnBeforePrepareLine`, IsHandled

## RunOnBeforePostLines

[Line 60](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L60).

- [62](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L62) raises `OnBeforePostLines`

## RunOnBeforeCalcInvoiceDiscountPosting

[Line 70](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L70).

- [72](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L72) raises `OnBeforeCalcInvoiceDiscountPosting`, IsHandled

## RunOnBeforeCalcLineDiscountPosting

[Line 80](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L80).

- [82](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L82) raises `OnBeforeCalcLineDiscountPosting`, IsHandled

## RunOnBeforeGetSalesAccount

[Line 90](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L90).

- [92](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L92) raises `OnBeforeGetSalesAccount`, IsHandled

## RunOnUpdateInvoicePostingBufferOnBeforeUpdate

[Line 100](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L100).

- [102](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L102) raises `OnUpdateInvoicePostingBufferOnBeforeUpdate`

## RunOnPrepareLineOnAfterFillInvoicePostingBuffer

[Line 112](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L112).

- [114](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L114) raises `OnPrepareLineOnAfterFillInvoicePostingBuffer`

## RunOnPrepareLineOnAfterFillInvoicePostingBuffer

[Line 119](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L119).

- [123](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L123) raises `OnPrepareLineOnAfterFillInvoicePostingBuffer`

## RunOnPrepareLineOnAfterSetAmounts

[Line 132](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L132).

- [134](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L134) raises `OnPrepareLineOnAfterSetAmounts`

## RunOnPrepareLineOnAfterGetGenPostingSetup

[Line 142](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L142), internal.

- [144](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L144) raises `OnPrepareLineOnAfterGetGenPostingSetup`

## RunOnPrepareLineOnBeforeSetAmounts

[Line 152](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L152).

- [154](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L154) raises `OnPrepareLineOnBeforeSetAmounts`, IsHandled

## RunOnPrepareLineOnBeforeSetAccount

[Line 162](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L162).

- [164](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L164) raises `OnPrepareLineOnBeforeSetAccount`

## RunOnPrepareLineOnBeforeUpdateInvoicePostingBufferLineDiscounts

[Line 172](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L172).

- [174](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L174) raises `OnPrepareLineOnBeforeUpdateInvoicePostingBufferLineDiscounts`

## RunOnPostBalancingEntryOnAfterGenJnlPostLine

[Line 184](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L184).

- [186](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L186) raises `OnPostBalancingEntryOnAfterGenJnlPostLine`

## RunOnPostBalancingEntryOnBeforeGenJnlPostLine

[Line 194](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L194).

- [196](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L196) raises `OnPostBalancingEntryOnBeforeGenJnlPostLine`

## RunOnPostBalancingEntryOnBeforeFindCustLedgerEntry

[Line 204](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L204), internal.

- [206](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L206) raises `OnPostBalancingEntryOnBeforeFindCustLedgerEntry`, IsHandled

## RunOnPostLedgerEntryOnAfterGenJnlPostLine

[Line 216](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L216).

- [218](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L218) raises `OnPostLedgerEntryOnAfterGenJnlPostLine`

## RunOnPostLedgerEntryOnBeforeGenJnlPostLine

[Line 226](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L226).

- [228](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L228) raises `OnPostLedgerEntryOnBeforeGenJnlPostLine`

## RunOnPostLinesOnAfterGenJnlLinePost

[Line 238](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L238).

- [240](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L240) raises `OnPostLinesOnAfterGenJnlLinePost`

## RunOnPostLinesOnBeforeGenJnlLinePost

[Line 248](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L248).

- [250](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L250) raises `OnPostLinesOnBeforeGenJnlLinePost`

## RunOnPrepareLineAfterGetGenPostingSetup

[Line 258](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L258).

- [260](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L260) raises `OnPrepareLineAfterGetGenPostingSetup`

## RunOnAfterPrepareInvoicePostingBuffer

[Line 268](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L268).

- [270](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L270) raises `OnAfterPrepareInvoicePostingBuffer`

## RunOnBeforePrepareInvoicePostingBuffer

[Line 278](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L278).

- [280](https://jonas-paprotka.de/ref/codeunit/827-service-post-invoice-events/source/#L280) raises `OnBeforePrepareInvoicePostingBuffer`

## Source

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

JOP-AL, 2026-11-20.
