---
title: "Codeunit 8002 Create Sub. Contract Renewal"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/8002-create-sub-contract-renewal/
type: codeunit
id: 8002
name: "Create Sub. Contract Renewal"
app: "Subscription Billing"
namespace: Microsoft.SubscriptionBilling
versions: "26-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/8002-create-sub-contract-renewal/source/?v=28 https://jonas-paprotka.de/ref/codeunit/8002-create-sub-contract-renewal/source/"
checked: 2026-11-20
changed: 2026-10-28
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 8002 Create Sub. Contract Renewal

JOP-AL, https://jonas-paprotka.de/ref/codeunit/8002-create-sub-contract-renewal/

| | |
| --- | --- |
| App | Subscription Billing |
| Namespace | Microsoft.SubscriptionBilling |
| Versions | 26-29 |
| Minors | W1 26.0-29.0; DE 26.0-29.0; US 26.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/8002-create-sub-contract-renewal/editions.json) |
| TableNo | Sub. Contract Renewal Line |
| SingleInstance | Yes |
| Source file | Contract Renewal/Codeunits/CreateSubContractRenewal.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| BatchCreateContractRenewal | (var ContractRenewalLine: Record "Sub. Contract Renewal Line") | - | internal | 26-29 | - | - |
| OpenSalesQuotes | () | - | internal | 26-29 | - | - |
| GetSalesQuoteNo | () | Code[20] | public | 26-29 | - | - |
| ClearCollectedSalesQuotes | () | - | internal | 26-29 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterCreateSalesHeaderFromSubscriptionContract | (CustomerSubscriptionContract: Record "Customer Subscription Contract"; var SalesHeader: Record "Sales Header") | 26-29 | - | - |
| Integration event | OnBeforeInsertSubscriptionContractDescriptionSalesLines | (CustomerSubscriptionContract: Record "Customer Subscription Contract"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) | 26-29 | - | - |
| Integration event | OnAfterInsertSubscriptionContractDescriptionSalesLines | (CustomerSubscriptionContract: Record "Customer Subscription Contract"; SalesHeader: Record "Sales Header") | 26-29 | - | - |
| Integration event | OnAfterInsertSalesQuoteLineFromSubContractRenewalLine | (var SalesLine: Record "Sales Line"; var SubContractRenewalLine: Record "Sub. Contract Renewal Line") | 26-29 | - | - |
| Integration event | OnAfterInsertTermInfoLine | (CurrentSalesHeader: Record "Sales Header"; var SubContractRenewalLine: Record "Sub. Contract Renewal Line") | 26-29 | - | - |
| Integration event | OnBeforeInsertSubscriptionLine | (var SalesLine: Record "Sales Line"; var SubContractRenewalLine: Record "Sub. Contract Renewal Line"; var IsHandled: Boolean) | 26-29 | - | - |
| Integration event | OnAfterInsertSubscriptionLine | (var SalesLine: Record "Sales Line"; var SubContractRenewalLine: Record "Sub. Contract Renewal Line"; var SalesSubscriptionLine: Record "Sales Subscription Line") | 26-29 | - | - |
| Integration event | OnAfterAddSubscriptionLinesToSalesLine | (var SalesLine: Record "Sales Line"; var SubContractRenewalLine: Record "Sub. Contract Renewal Line") | 26-29 | - | - |
| Integration event | OnAfterCheckSubContractRenewalLine | (var ContractRenewalLine: Record "Sub. Contract Renewal Line") | 26-29 | - | - |
| Integration event | OnAfterCreateSingleContractRenewal | (SalesQuoteHeader: Record "Sales Header"; CustomerSubscriptionContract: Record "Customer Subscription Contract") | 26-29 | - | - |
| Integration event | OnAfterRunCheck | (var SubContractRenewalLine: Record "Sub. Contract Renewal Line") | 26-29 | - | - |
| Integration event | OnBeforeCreateSalesQuoteLineFromSubContractRenewalLine | (var SubContractRenewalLine: Record "Sub. Contract Renewal Line") | 26-29 | - | - |

## Source

Symbols: Microsoft.SubscriptionBilling.symbols.3099ffc7-4cf7-4df6-9b96-7e4bc2bb587c, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
