Table "Deferral Header"
Header record for deferral schedules that tracks the overall deferral setup for a specific document line. Links to the source document and contains parameters for generating the detailed deferral schedule.
Properties
| Name | Value |
|---|---|
| Caption | Deferral Header |
| DataCaptionFields | 13 |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "Deferral Doc. Type" | Enum Microsoft.Finance.Deferral."Deferral Document Type" | Type of source document (Purchase, Sales, or G/L) that initiated this deferral. |
| "Gen. Jnl. Template Name" | Code[10] | General Journal Template name when the deferral originates from a G/L journal entry. |
| "Gen. Jnl. Batch Name" | Code[10] | General Journal Batch name when the deferral originates from a G/L journal entry. |
| "Document Type" | Integer | Document type ID from the source document (Invoice, Credit Memo, etc.). Maps to document type enums from various modules. |
| "Document No." | Code[20] | Document number from the source document that contains the line being deferred. |
| "Line No." | Integer | Line number within the source document that is being deferred. |
| "Deferral Code" | Code[10] | Deferral template code that defines the calculation method and parameters for this schedule. |
| "Amount to Defer" | Decimal | Current amount to be deferred in the document currency. Can be modified from the initial amount if needed. |
| "Amount to Defer (LCY)" | Decimal | Amount to be deferred converted to local currency (LCY) for reporting purposes. |
| "Calc. Method" | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" | Calculation method copied from the deferral template at the time of schedule creation. |
| "Start Date" | Date | Start date for the deferral schedule, determining when the first deferral entry will be posted. Must fall within allowed posting date range and accounting periods. |
| "No. of Periods" | Integer | Number of periods over which the deferral amount will be recognized. Must be at least 1 period. |
| "Schedule Description" | Text[100] | Description for this deferral schedule, displayed in deferral forms and reports. |
| "Initial Amount to Defer" | Decimal | Original amount to defer before any modifications. Used for validation to ensure deferred amount doesn't exceed the source. |
| "Currency Code" | Code[10] | Currency code of the source document, used for foreign currency deferral calculations. |
| "Schedule Line Total" | Decimal | Total amount of all deferral schedule lines. FlowField that sums amounts from related Deferral Line records. |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemRowVersion | BigInteger |
Methods
CalculateSchedule
Calculates and creates the deferral schedule lines based on the header settings. Validates that a deferral code is specified before creating the schedule.
procedure CalculateSchedule(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the schedule was successfully calculated, false otherwise |
Events
OnBeforeCalculateSchedule
Integration event raised before calculating the deferral schedule. Enables custom validation or modification of deferral header parameters.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateSchedule(var DeferralHeader: Record "Deferral Header")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record being processed for schedule calculation |
Remarks
Raised from CalculateSchedule procedure before validating deferral code and creating schedule lines.
OnDeleteOnBeforeDeleteAll
Integration event raised before deleting all deferral lines when the header is deleted. Enables custom cleanup logic or cascade deletion handling.
[IntegrationEvent(False,False)]
local procedure OnDeleteOnBeforeDeleteAll(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record being deleted |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Filtered deferral line records about to be deleted |
Remarks
Raised from OnDelete trigger after filtering deferral lines but before DeleteAll operation.
OnValidateStartDateOnAfterCalcThrowScheduleOutOfBoundError
Integration event raised after calculating whether to show schedule out of bounds error. Enables custom logic for determining accounting period validation errors.
[IntegrationEvent(False,False)]
local procedure OnValidateStartDateOnAfterCalcThrowScheduleOutOfBoundError(DeferralHeader: Record "Deferral Header", var ThrowScheduleOutOfBoundError: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header being validated for start date |
| ThrowScheduleOutOfBoundError | Boolean |
Whether to throw bounds error (can be modified by subscribers) |
Remarks
Raised from Start Date field validation after checking accounting periods but before error handling.