---
id: object/codeunit/8067
type: object
title: Codeunit 8067 "Customer Deferrals Mngmt."
summary: Codeunit 8067 "Customer Deferrals Mngmt." in Subscription Billing (Microsoft.SubscriptionBilling). 1 public procedures, 3 events, 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: fec2b3fce81706095ad8f815454775fb131d2b42534daf6a65a1e4d853964015
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Deferrals/Codeunits/CustomerDeferralsMngmt.Codeunit.al
    title: src/Apps/W1/Subscription Billing/app/Deferrals/Codeunits/CustomerDeferralsMngmt.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/9905
object_type: codeunit
object_id: 8067
name: Customer Deferrals Mngmt.
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: 19
  events: 3
  subscribers: 9
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 8067 "Customer Deferrals Mngmt."

> Codeunit 8067 "Customer Deferrals Mngmt." in Subscription Billing (Microsoft.SubscriptionBilling). 1 public procedures, 3 events, 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/Deferrals/Codeunits/CustomerDeferralsMngmt.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |
| Permissions | tabledata "Sales Invoice Line" = r |

## Events published

- `OnBeforeInsertCustomerContractDeferral(var CustSubContractDeferral: Record "Cust. Sub. Contract Deferral"; SalesLine: Record "Sales Line"; PeriodNo: Integer; NumberOfPeriods: Integer)` (integration)
- `OnBeforeInsertCustomerContractDeferralWhenStartingOnFirstDayInMonth(var CustSubContractDeferral: Record "Cust. Sub. Contract Deferral"; SalesLine: Record "Sales Line"; PeriodNo: Integer; NumberOfPeriods: Integer)` (integration, obsolete 29.0)
- `OnBeforeInsertCustomerContractDeferralWhenNotStartingOnFirstDayInMonth(var CustSubContractDeferral: Record "Cust. Sub. Contract Deferral"; SalesLine: Record "Sales Line"; PeriodNo: Integer; NumberOfPeriods: Integer)` (integration, obsolete 29.0)

## Event subscriptions

- OnPrepareLineOnBeforeSetAccount subscribes to Codeunit "Sales Post Invoice Events" OnPrepareLineOnBeforeSetAccount
- OnPrepareLineOnBeforeSetLineDiscAccount subscribes to Codeunit "Sales Post Invoice Events" OnPrepareLineOnBeforeSetLineDiscAccount
- InsertCustomerDeferralsFromSalesInvoice subscribes to Codeunit "Sales-Post" OnPostSalesLineOnBeforeInsertInvoiceLine
- InsertCustomerDeferralsFromSalesCrMemo subscribes to Codeunit "Sales-Post" OnAfterSalesCrMemoLineInsert
- OnAfterFindEntries subscribes to Page "Navigate" OnAfterNavigateFindRecords
- OnBeforeShowRecords subscribes to Page "Navigate" OnBeforeShowRecords
- GetEntryNo subscribes to Codeunit "Gen. Jnl.-Post Line" OnAfterGLFinishPosting
- SetContractNo subscribes to Codeunit "Gen. Jnl.-Post Line" OnBeforePostGenJnlLine
- TransferContractNoToGLEntry subscribes to Codeunit "Gen. Jnl.-Post Line" OnBeforeInsertGlobalGLEntry

## Procedures

- `SetDeferralNo(NewDeferralNo: Integer)` (internal)

Plus 6 local procedures.

## Recent changes

- 2026-09-04 [#9905 [Bug][SubscriptionBilling] Contract lines of type G/L Account never post to the selected G/L account](../../changes/bcapps/9905.md) (main, BC30, fix)

## Across versions

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

## Deprecations

- procedure OnBeforeInsertCustomerContractDeferralWhenNotStartingOnFirstDayInMonth: Pending 29.0 (#if not CLEAN29), "Replaced by OnBeforeInsertCustomerContractDeferral."
- procedure OnBeforeInsertCustomerContractDeferralWhenStartingOnFirstDayInMonth: Pending 29.0 (#if not CLEAN29), "Replaced by OnBeforeInsertCustomerContractDeferral."

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: "Customer Deferrals Mngmt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
