---
id: object/codeunit/8055
type: object
title: Codeunit 8055 "Sub. Contracts Item Management"
summary: Codeunit 8055 "Sub. Contracts Item Management" in Subscription Billing (Microsoft.SubscriptionBilling). 15 public procedures, 12 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: 9a9033f79ea94b405ced1d8f621d2dcc1d5b8f8ed63bcd3a1261604e3f309f57
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Base/Codeunits/SubContractsItemManagement.Codeunit.al
    title: src/Apps/W1/Subscription Billing/app/Base/Codeunits/SubContractsItemManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11218
    - change/bcapps/9850
object_type: codeunit
object_id: 8055
name: Sub. Contracts Item Management
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: 33
  events: 0
  subscribers: 12
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 8055 "Sub. Contracts Item Management"

> Codeunit 8055 "Sub. Contracts Item Management" in Subscription Billing (Microsoft.SubscriptionBilling). 15 public procedures, 12 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/SubContractsItemManagement.Codeunit.al) · facts from BC29

## Properties

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

## Event subscriptions

- ItemOnAfterValidateType subscribes to Table "Item" OnAfterValidateEvent (Type)
- SalesLineOnBeforeValidateNo subscribes to Table "Sales Line" OnBeforeValidateEvent (No.)
- PurchaseLineOnBeforeValidateEvent subscribes to Table "Purchase Line" OnBeforeValidateEvent (No.)
- OnBeforePostPurchLine subscribes to Codeunit "Purch.-Post" OnBeforePostPurchLine
- BOMComponentOnAfterValidateNo subscribes to Table "BOM Component" OnBeforeValidateEvent (No.)
- ErrorIfAllowInvoiceDiscountForPriceListLineForServiceCommitmentItem subscribes to Table "Price List Line" OnAfterValidateEvent (Allow Invoice Disc.)
- DisableInvoiceDiscountForServiceCommitmentItemAfterPriceAssetAssigned subscribes to Table "Price List Line" OnAfterCopyFromForPriceAsset
- DisableInvoiceDiscountForServiceCommitmentItemAfterChangingAmountType subscribes to Table "Price List Line" OnAfterValidateEvent (Amount Type)
- CopyPrimaryFieldValueFromItemAttribute subscribes to Table "Item Attribute Value Selection" OnInsertRecordOnBeforeItemAttrValueSelectionInsert
- PreventDeletionOfSubscriptionItemOnDelNonStockItem subscribes to Codeunit "Catalog Item Management" OnDelNonStockItemOnAfterCheckRelations
- InsertItemServiceCommPackAfterCreateNewItem subscribes to Codeunit "Catalog Item Management" OnAfterCreateNewItem
- InsertItemServiceCommPackAfterCreateItemFromTemplate subscribes to Codeunit "Item Templ. Mgt." OnAfterCreateItemFromTemplate

## Procedures

- `IsServiceCommitmentItem(ItemNo: Code[20]): Boolean`
- `IsItemWithServiceCommitments(ItemNo: Code[20]): Boolean` (internal)
- `GetSalesPriceForItem(var UnitPrice: Decimal; ItemNo: Code[20]; Quantity: Decimal; CurrencyCode: Code[10]; SellToCustomerNo: Code[20]; BillToCustomerNo: Code[20])`
- `CreateTempSalesHeader(var TempSalesHeader: Record "Sales Header" temporary; DocumentType: Enum "Sales Document Type"; SellToCustomerNo: Code[20]; BillToCustomerNo: Code[20]; OrderDate: Date; CurrencyCode: Code[10])` (internal)
- `CreateTempSalesLine(var TempSalesLine: Record "Sales Line" temporary; var TempSalesHeader: Record "Sales Header" temporary; ServiceObject: Record "Subscription Header"; OrderDate: Date)` (internal)
- `CreateTempSalesLine(var TempSalesLine: Record "Sales Line" temporary; var TempSalesHeader: Record "Sales Header" temporary; ServiceObjectType: enum "Service Object Type"; SourceNo: Code[20]; Quantity: Decimal; OrderDate: Date; VariantCode: Code[10]; UnitOfMeasureCode: Code[10])` (internal)
- `CalculateUnitPrice(var TempSalesHeader: Record "Sales Header" temporary; var TempSalesLine: Record "Sales Line" temporary): Decimal`
- `CalculateUnitCost(ItemNo: Code[20]): Decimal`
- `CreateTempPurchaseHeader(var TempPurchaseHeader: Record "Purchase Header" temporary; DocumentType: Enum "Purchase Document Type"; PayToVendorNo: Code[20]; OrderDate: Date; CurrencyCode: Code[10])` (internal)
- `CreateTempPurchaseLine(var TempPurchaseLine: Record "Purchase Line" temporary; var TempPurchaseHeader: Record "Purchase Header" temporary; ServiceObject: Record "Subscription Header"; OrderDate: Date)` (internal)
- `CreateTempPurchaseLine(var TempPurchaseLine: Record "Purchase Line" temporary; var TempPurchaseHeader: Record "Purchase Header" temporary; ServiceObjectType: enum "Service Object Type"; SourceNo: Code[20]; Quantity: Decimal; OrderDate: Date; VariantCode: Code[10]; UnitOfMeasureCode: Code[10])` (internal)
- `CalculateDirectUnitCost(var TempPurchaseHeader: Record "Purchase Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary): Decimal`
- `InsertItemServiceCommitmentPackage(Item: Record Item; PackageCode: Code[20]; Standard: Boolean)` (internal)
- `GetItemTranslation(ItemNo: Code[20]; VariantCode: Code[10]; CustomerNo: Code[20]): Text[100]`
- `SetAllowInsertOfInvoicingItem(NewAllowInsertOfInvoicingItem: Boolean)`

Plus 6 local procedures.

## Recent changes

- 2026-09-10 [#11218 [master] - Subscription Contract Price Update applies the lowest sales price across all Unit of Measure codes instead of respecting Unit-Specific Price List entries in Subscription Billing.](../../changes/bcapps/11218.md) (main, BC30, fix)
- 2026-07-31 [#9850 Fix VariantCode lost during Contract Price Update proposal](../../changes/bcapps/9850.md) (main, BC30, fix)

## 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 Item Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
