---
id: object/codeunit/8059
type: object
title: Codeunit 8059 "Sub. Contracts General Mgt."
summary: Codeunit 8059 "Sub. Contracts General Mgt." in Subscription Billing (Microsoft.SubscriptionBilling). 19 public procedures, 9 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - subscription billing
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: d6510863d2e2b2e520658a83cd508052998539511f2eda77d74e09746ce76a01
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Base/Codeunits/SubContractsGeneralMgt.Codeunit.al
    title: src/Apps/W1/Subscription Billing/app/Base/Codeunits/SubContractsGeneralMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 8059
name: Sub. Contracts General Mgt.
namespace: Microsoft.SubscriptionBilling
app: Subscription Billing
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 31
  events: 0
  subscribers: 9
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 8059 "Sub. Contracts General Mgt."

> Codeunit 8059 "Sub. Contracts General Mgt." in Subscription Billing (Microsoft.SubscriptionBilling). 19 public procedures, 9 event subscribers. Introduced in BC29, still in BC30.

Subscription Billing · Microsoft.SubscriptionBilling · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Base/Codeunits/SubContractsGeneralMgt.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |

## Event subscriptions

- SalesInvoiceLineDeleteArchivedBillingLines subscribes to Table "Sales Invoice Line" OnAfterDeleteEvent
- PurchaseInvoiceLineDeleteArchivedBillingLines subscribes to Table "Purch. Inv. Line" OnAfterDeleteEvent
- SalesCrMemoLineDeleteArchivedBillingLines subscribes to Table "Sales Cr.Memo Line" OnAfterDeleteEvent
- PurchCrMemoLineDeleteArchivedBillingLines subscribes to Table "Purch. Cr. Memo Line" OnAfterDeleteEvent
- SetServiceObjectAsRecRef subscribes to Codeunit "Document Attachment Mgmt" OnAfterGetRefTable
- FilterDocumentAttachmentOnRecRefPrimaryKey subscribes to Page "Document Attachment Details" OnAfterOpenForRecRef
- InitDocumentAttachmentFields subscribes to Table "Document Attachment" OnAfterInitFieldsFromRecRef
- CheckIfCustomerContractOrServiceObjectExistWhenDeleteCustomer subscribes to Table "Customer" OnBeforeDeleteEvent
- CheckIfVendorContractExistWhenDeleteVendor subscribes to Table "Vendor" OnBeforeDeleteEvent

## Procedures

- `OpenContractCard(Partner: Enum "Service Partner"; ContractNo: Code[20])`
- `OpenPartnerCard(Partner: Enum "Service Partner"; PartnerNo: Code[20])`
- `GetContractDescription(Partner: Enum "Service Partner"; ContractNo: Code[20]): Text`
- `GetPartnerName(Partner: Enum "Service Partner"; PartnerNo: Code[20]): Text`
- `HasConnectionToContractLine(ContractNo: Code[20]; ContractLineNo: Integer): Boolean`
- `ShowBillingLines(ContractNo: Code[20]; ContractLineNo: Integer; ServicePartner: Enum "Service Partner")` (internal)
- `ShowBillingLinesForDocumentLine(DocumentType: Enum "Sales Document Type"; DocumentNo: Code[20]; DocumentNoLineNo: Integer)`
- `ShowArchivedBillingLinesForServiceCommitment(ServiceCommitmentEntryNo: Integer)` (internal)
- `ShowArchivedBillingLines(ContractNo: Code[20]; ContractLineNo: Integer; ServicePartner: Enum "Service Partner"; RecurringBillingDocumentType: Enum "Rec. Billing Document Type"; DocumentNo: Code[20])` (internal)
- `ShowUnpostedSalesDocument(SalesDocumentType: Enum "Sales Document Type"; CustomerContract: Record "Customer Subscription Contract")` (internal)
- `ShowPostedSalesInvoices(CustomerContract: Record "Customer Subscription Contract")` (internal)
- `ShowPostedSalesCreditMemos(CustomerContract: Record "Customer Subscription Contract")` (internal)
- `ShowPostedPurchaseInvoices(VendorContract: Record "Vendor Subscription Contract")` (internal)
- `ShowPostedPurchaseCreditMemos(VendorContract: Record "Vendor Subscription Contract")` (internal)
- `ShowUnpostedPurchDocument(PurchDocumentType: Enum "Purchase Document Type"; VendorContract: Record "Vendor Subscription Contract")` (internal)
- `BillingLineExists(ServicePartner: Enum "Service Partner"; ContractNo: Code[20]; ContractLineNo: Integer): Boolean` (internal)
- `TestMergingServiceObjects(ServiceObject: Record "Subscription Header"; PrevServiceObject: Record "Subscription Header")` (internal)
- `TestMergingServiceCommitments(ServiceCommitment: Record "Subscription Line"; PrevServiceCommitment: Record "Subscription Line")` (internal)
- `DeleteDocumentAttachmentForNo(TableId: Integer; RecNo: Code[20])` (internal)

Plus 3 local procedures.

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Sub. Contracts General Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
