---
title: "Codeunit 8059 Sub. Contracts General Mgt., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/points/
object: https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/
app: "Subscription Billing"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/
checked: 2026-11-20
changed: 2026-11-04
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 8059 Sub. Contracts General Mgt., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/points/

22 procedures and triggers with a step in src/Apps/W1/Subscription Billing/App/Base/Codeunits/SubContractsGeneralMgt.Codeunit.al, in source order, read from the text, not from a run.

## OpenContractCard

[Line 15](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L15).

- [28](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L28) runs [Page 8052 Customer Contract](https://jonas-paprotka.de/ref/page/8052-customer-contract/)
- [34](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L34) runs [Page 8070 Vendor Contract](https://jonas-paprotka.de/ref/page/8070-vendor-contract/)

## OpenPartnerCard

[Line 39](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L39).

- [51](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L51) runs [Page 21 Customer Card](https://jonas-paprotka.de/ref/page/21-customer-card/)
- [56](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L56) runs [Page 26 Vendor Card](https://jonas-paprotka.de/ref/page/26-vendor-card/)

## GetContractDescription

[Line 61](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L61).

- [72](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L72) calls [Table 8052 Customer Subscription Contract](https://jonas-paprotka.de/ref/table/8052-customer-subscription-contract/) `GetDescription`
- [75](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L75) calls [Table 8063 Vendor Subscription Contract](https://jonas-paprotka.de/ref/table/8063-vendor-subscription-contract/) `GetDescription`

## ShowBillingLines

[Line 101](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L101), internal.

- [105](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L105) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `FilterBillingLineOnContractLine`

## ShowBillingLinesForDocumentLine

[Line 109](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L109).

- [113](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L113) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `FilterBillingLineOnDocumentLine`
- [113](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L113) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `GetBillingDocumentTypeFromSalesDocumentType`

## ShowArchivedBillingLinesForServiceCommitment

[Line 117](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L117), internal.

- [121](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L121) calls [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) `FilterBillingLineArchiveOnServiceCommitment`

## ShowArchivedBillingLines

[Line 125](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L125), internal.

- [129](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L129) calls [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) `FilterBillingLineArchiveOnDocument`
- [130](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L130) calls [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) `FilterBillingLineArchiveOnContractLine`

## SalesInvoiceLineDeleteArchivedBillingLines

[Line 135](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L135), local.

- [149](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L149) writes [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) Delete

## PurchaseInvoiceLineDeleteArchivedBillingLines

[Line 154](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L154), local.

- [168](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L168) writes [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) Delete

## SalesCrMemoLineDeleteArchivedBillingLines

[Line 173](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L173), local.

- [187](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L187) writes [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) Delete

## PurchCrMemoLineDeleteArchivedBillingLines

[Line 192](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L192), local.

- [206](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L206) writes [Table 8064 Billing Line Archive](https://jonas-paprotka.de/ref/table/8064-billing-line-archive/) Delete

## ShowUnpostedSalesDocument

[Line 210](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L210), internal.

- [214](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L214) calls `MarkSalesHeaderFromBillingLine`
- [217](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L217) runs [Page 9301 Sales Invoice List](https://jonas-paprotka.de/ref/page/9301-sales-invoice-list/)
- [219](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L219) runs [Page 9302 Sales Credit Memos](https://jonas-paprotka.de/ref/page/9302-sales-credit-memos/)

## MarkSalesHeaderFromBillingLine

[Line 223](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L223), local.

- [228](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L228) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `GetBillingDocumentTypeFromSalesDocumentType`
- [237](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L237) writes [Table 36 Sales Header](https://jonas-paprotka.de/ref/table/36-sales-header/) Insert

## ShowPostedSalesInvoices

[Line 243](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L243), internal.

- [256](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L256) writes [Table 112 Sales Invoice Header](https://jonas-paprotka.de/ref/table/112-sales-invoice-header/) Insert
- [261](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L261) runs [Page 143 Posted Sales Invoices](https://jonas-paprotka.de/ref/page/143-posted-sales-invoices/)

## ShowPostedSalesCreditMemos

[Line 264](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L264), internal.

- [277](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L277) writes [Table 114 Sales Cr.Memo Header](https://jonas-paprotka.de/ref/table/114-sales-cr-memo-header/) Insert
- [282](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L282) runs [Page 144 Posted Sales Credit Memos](https://jonas-paprotka.de/ref/page/144-posted-sales-credit-memos/)

## ShowPostedPurchaseInvoices

[Line 286](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L286), internal.

- [299](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L299) writes [Table 122 Purch. Inv. Header](https://jonas-paprotka.de/ref/table/122-purch-inv-header/) Insert
- [304](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L304) runs [Page 146 Posted Purchase Invoices](https://jonas-paprotka.de/ref/page/146-posted-purchase-invoices/)

## ShowPostedPurchaseCreditMemos

[Line 307](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L307), internal.

- [320](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L320) writes [Table 124 Purch. Cr. Memo Hdr.](https://jonas-paprotka.de/ref/table/124-purch-cr-memo-hdr/) Insert
- [325](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L325) runs [Page 147 Posted Purchase Credit Memos](https://jonas-paprotka.de/ref/page/147-posted-purchase-credit-memos/)

## ShowUnpostedPurchDocument

[Line 328](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L328), internal.

- [332](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L332) calls `MarkPurchaseHeaderFromBillingLine`
- [335](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L335) runs [Page 9308 Purchase Invoices](https://jonas-paprotka.de/ref/page/9308-purchase-invoices/)
- [337](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L337) runs [Page 9309 Purchase Credit Memos](https://jonas-paprotka.de/ref/page/9309-purchase-credit-memos/)

## MarkPurchaseHeaderFromBillingLine

[Line 341](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L341), local.

- [346](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L346) calls [Table 8061 Billing Line](https://jonas-paprotka.de/ref/table/8061-billing-line/) `GetBillingDocumentTypeFromPurchaseDocumentType`
- [355](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L355) writes [Table 38 Purchase Header](https://jonas-paprotka.de/ref/table/38-purchase-header/) Insert

## BillingLineExists

[Line 361](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L361), internal.

- [365](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L365) calls `FilterBillingLineOnContractLine`

## InitDocumentAttachmentFields

[Line 462](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L462), local.

- [473](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L473) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `No.`

## DeleteDocumentAttachmentForNo

[Line 478](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L478), internal.

- [485](https://jonas-paprotka.de/ref/codeunit/8059-sub-contracts-general-mgt/source/#L485) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) DeleteAll

## Source

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

JOP-AL, 2026-11-20.
