---
title: "Codeunit 8004 Post Sub. Contract Renewal, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/points/
object: https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/
app: "Subscription Billing"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/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 8004 Post Sub. Contract Renewal, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/points/

16 procedures and triggers with a step in src/Apps/W1/Subscription Billing/App/Contract Renewal/Codeunits/PostSubContractRenewal.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 12](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L12), trigger.

- [14](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L14) calls `RunCheck`
- [15](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L15) calls `Post`

## RunCheck

[Line 18](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L18), local.

- [27](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L27) calls [Codeunit 8003 Sub. Contract Renewal Mgt.](https://jonas-paprotka.de/ref/codeunit/8003-sub-contract-renewal-mgt/) `IsContractRenewal`
- [30](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L30) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `CheckBlockedCustOnDocs`
- [33](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L33) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `CheckBlockedCustOnDocs`
- [36](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L36) calls [Codeunit 8003 Sub. Contract Renewal Mgt.](https://jonas-paprotka.de/ref/codeunit/8003-sub-contract-renewal-mgt/) `FilterSalesLinesWithTypeServiceObject`
- [40](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L40) calls [Table 8068 Sales Subscription Line](https://jonas-paprotka.de/ref/table/8068-sales-subscription-line/) `FilterOnSalesLine`

## Post

[Line 50](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L50), local.

- [55](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L55) calls [Codeunit 8003 Sub. Contract Renewal Mgt.](https://jonas-paprotka.de/ref/codeunit/8003-sub-contract-renewal-mgt/) `FilterSalesLinesWithTypeServiceObject`
- [59](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L59) calls `CreatePlannedServiceCommitments`
- [60](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L60) calls `ProcessPlannedServiceCommitment`
- [61](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L61) calls `SetQuantites`

## CreatePlannedServiceCommitments

[Line 66](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L66), local.

- [71](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L71) calls [Table 8068 Sales Subscription Line](https://jonas-paprotka.de/ref/table/8068-sales-subscription-line/) `FilterOnSalesLine`
- [74](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L74) calls `InsertPlannedServiceCommitmentFromSalesServiceCommitment`

## InsertPlannedServiceCommitmentFromSalesServiceCommitment

[Line 78](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L78), local.

- [86](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L86) raises `OnBeforeInsertPlannedSubscriptionLineFromSalesSubscriptionLine`, IsHandled
- [99](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L99) validates [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `Subscription Line Start Date`
- [102](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L102) validates [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `Subscription Line Start Date`
- [104](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L104) validates [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `Subscription Line Start Date`
- [109](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L109) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `CopyFromSalesServiceCommitment`
- [110](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L110) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `CalculateSubscriptionDates`
- [111](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L111) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `SetCurrencyData`
- [112](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L112) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `SetLCYFields`
- [113](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L113) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `SetDefaultDimensions`
- [114](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L114) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `GetCombinedDimensionSetID`
- [122](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L122) writes [Table 8002 Planned Subscription Line](https://jonas-paprotka.de/ref/table/8002-planned-subscription-line/) Insert
- [124](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L124) raises `OnAfterInsertPlannedSubscriptionLineFromSalesSubscriptionLine`

## ProcessPlannedServCommsForPostedSalesInvoice

[Line 141](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L141), internal.

- [147](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L147) calls `DropPlannedServiceCommitmentBuffer`
- [157](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L157) calls `CreatePlannedServiceCommitmentBuffer`
- [161](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L161) calls `ProcessPlannedServiceCommitmentBuffer`

## ProcessPlannedServCommsForPostedSalesCreditMemo

[Line 164](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L164), internal.

- [178](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L178) calls [Table 8062 Cust. Sub. Contract Line](https://jonas-paprotka.de/ref/table/8062-cust-sub-contract-line/) `GetServiceCommitment`
- [179](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L179) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `ServiceCommitmentArchiveExistsForPeriodExists`
- [180](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L180) calls `CreatePlannedServiceCommitmentFromServiceCommitment`
- [181](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L181) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `UpdateServiceCommitmentFromServiceCommitmentArchive`

## ProcessPlannedServCommsForPostedPurchaseInvoice

[Line 188](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L188), internal.

- [194](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L194) calls `DropPlannedServiceCommitmentBuffer`
- [204](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L204) calls `CreatePlannedServiceCommitmentBuffer`
- [208](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L208) calls `ProcessPlannedServiceCommitmentBuffer`

## ProcessPlannedServCommsForPostedPurchaseCreditMemo

[Line 211](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L211), internal.

- [225](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L225) calls [Table 8065 Vend. Sub. Contract Line](https://jonas-paprotka.de/ref/table/8065-vend-sub-contract-line/) `GetServiceCommitment`
- [226](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L226) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `ServiceCommitmentArchiveExistsForPeriodExists`
- [227](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L227) calls `CreatePlannedServiceCommitmentFromServiceCommitment`
- [228](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L228) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `UpdateServiceCommitmentFromServiceCommitmentArchive`

## DropPlannedServiceCommitmentBuffer

[Line 235](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L235), local.

- [239](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L239) writes [Table 8002 Planned Subscription Line](https://jonas-paprotka.de/ref/table/8002-planned-subscription-line/) DeleteAll

## CreatePlannedServiceCommitmentBuffer

[Line 242](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L242), local.

- [247](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L247) writes [Table 8002 Planned Subscription Line](https://jonas-paprotka.de/ref/table/8002-planned-subscription-line/) Insert

## CreatePlannedServiceCommitmentFromServiceCommitment

[Line 251](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L251), local.

- [259](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L259) writes [Table 8002 Planned Subscription Line](https://jonas-paprotka.de/ref/table/8002-planned-subscription-line/) Insert

## ProcessPlannedServiceCommitmentBuffer

[Line 262](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L262), local.

- [270](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L270) calls `ProcessPlannedServiceCommitment`

## ProcessPlannedServiceCommitment

[Line 278](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L278).

- [287](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L287) raises `OnBeforeProcessPlannedSubscriptionLine`, IsHandled
- [292](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L292) calls `CheckPerformServiceCommitmentUpdate`
- [301](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L301) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `SetLCYFields`
- [308](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L308) raises `OnBeforeUpdateSubscriptionLineFromPlannedSubscriptionLine`
- [310](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L310) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `ArchiveServiceCommitment`
- [311](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L311) writes [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) Modify
- [312](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L312) writes [Table 8002 Planned Subscription Line](https://jonas-paprotka.de/ref/table/8002-planned-subscription-line/) Delete(true)

## CheckPerformServiceCommitmentUpdate

[Line 316](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L316), local.

- [330](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L330) calls [Table 8059 Subscription Line](https://jonas-paprotka.de/ref/table/8059-subscription-line/) `SetPerformUpdateForContractPriceUpdate`
- [332](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L332) raises `OnCheckPerformSubscriptionLineUpdate`

## SetQuantites

[Line 336](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L336), local.

- [348](https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/#L348) writes [Table 37 Sales Line](https://jonas-paprotka.de/ref/table/37-sales-line/) Modify

## Source

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

JOP-AL, 2026-11-20.
