Codeunit "Deferral Utilities"
Central utility functions for deferral processing including schedule creation, calculation methods, and posting operations. Handles all core deferral business logic and integrates with various document types and posting routines.
Methods
CreateRecurringDescription
Creates a period-specific description by substituting placeholders with actual date values. Supports day, week, month, month text, accounting period name, and year placeholders.
procedure CreateRecurringDescription(PostingDate: Date, Description: Text[100]): Text[100]
Parameters
| Name | Type | Description |
|---|---|---|
| PostingDate | Date |
The posting date to extract date components from |
| Description | Text[100] |
Template description with placeholders (%1=Day, %2=Week, %3=Month, %4=Month Text, %5=Period Name, %6=Year) |
Returns
| Type | Description |
|---|---|
| Text[100] |
Final description with placeholders replaced by actual values |
CreateDeferralSchedule
Creates a complete deferral schedule based on the specified parameters and calculation method. Generates header and line records with amounts distributed according to the selected calculation method.
procedure CreateDeferralSchedule(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, AmountToDefer: Decimal, CalcMethod: Enum "Deferral Calculation Method", StartDate: Date, NoOfPeriods: Integer, ApplyDeferralPercentage: Boolean, DeferralDescription: Text[100], AdjustStartDate: Boolean, CurrencyCode: Code[10])
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code defining calculation parameters |
| DeferralDocType | Integer |
Type of source document (Purchase, Sales, G/L) |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
| AmountToDefer | Decimal |
Total amount to be deferred |
| CalcMethod | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" |
Method for calculating period amounts (Straight-Line, Equal per Period, etc.) |
| StartDate | Date |
Date to start the deferral schedule |
| NoOfPeriods | Integer |
Number of periods to distribute the deferral over |
| ApplyDeferralPercentage | Boolean |
Whether to apply the deferral percentage from the template |
| DeferralDescription | Text[100] |
Description for the deferral schedule |
| AdjustStartDate | Boolean |
Whether to adjust start date based on template settings |
| CurrencyCode | Code[10] |
Currency code for foreign currency handling |
CalcDeferralNoOfPeriods
Calculates the actual number of deferral periods based on the calculation method and parameters. For user-defined methods, returns the number of existing deferral lines instead of the parameter value.
procedure CalcDeferralNoOfPeriods(CalcMethod: Enum "Deferral Calculation Method", NoOfPeriods: Integer, StartDate: Date): Integer
Parameters
| Name | Type | Description |
|---|---|---|
| CalcMethod | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" |
Calculation method (Straight-Line, Equal per Period, Days per Period, User-Defined) |
| NoOfPeriods | Integer |
Number of periods specified in the deferral setup |
| StartDate | Date |
Start date for the deferral schedule |
Returns
| Type | Description |
|---|---|
| Integer |
Actual number of periods that will be created for the deferral schedule |
FilterDeferralLines
Sets filters on the deferral line record to retrieve lines for a specific source document. Used throughout the deferral system to isolate deferral lines by their source document parameters.
procedure FilterDeferralLines(var DeferralLine: Record "Deferral Line", DeferralDocType: Option, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral Line record reference to apply filters to |
| DeferralDocType | Option |
Type of source document (Purchase, Sales, G/L) |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
IsDateNotAllowed
Checks if the specified posting date is allowed for deferral posting based on user and general ledger setup.
procedure IsDateNotAllowed(PostingDate: Date): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| PostingDate | Date |
Date to validate for deferral posting |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the date is not allowed, false if it is allowed |
SetDeferralRecords
Creates or updates a deferral header record with the specified parameters. Handles both new header creation and updating existing headers with new calculation parameters.
procedure SetDeferralRecords(var DeferralHeader: Record "Deferral Header", DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, CalcMethod: Enum "Deferral Calculation Method", NoOfPeriods: Integer, AdjustedDeferralAmount: Decimal, AdjustedStartDate: Date, DeferralCode: Code[10], DeferralDescription: Text[100], AmountToDefer: Decimal, AdjustStartDate: Boolean, CurrencyCode: Code[10])
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral Header record reference to create or update |
| DeferralDocType | Integer |
Type of source document (Purchase, Sales, G/L) |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
| CalcMethod | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" |
Method for calculating period amounts |
| NoOfPeriods | Integer |
Number of periods to distribute the deferral over |
| AdjustedDeferralAmount | Decimal |
Final deferral amount after percentage application |
| AdjustedStartDate | Date |
Final start date after template-based adjustments |
| DeferralCode | Code[10] |
Deferral template code |
| DeferralDescription | Text[100] |
Description for the deferral schedule |
| AmountToDefer | Decimal |
Original amount to defer before adjustments |
| AdjustStartDate | Boolean |
Whether start date was adjusted |
| CurrencyCode | Code[10] |
Currency code for foreign currency handling |
RemoveOrSetDeferralSchedule
Creates, updates, or removes a deferral schedule based on the provided deferral code and parameters. If no deferral code is provided, removes any existing schedule. If a code is provided, creates or updates the schedule.
procedure RemoveOrSetDeferralSchedule(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, Amount: Decimal, PostingDate: Date, Description: Text[100], CurrencyCode: Code[10], AdjustStartDate: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code to use, blank to remove schedule |
| DeferralDocType | Integer |
Type of document containing the deferral |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
| Amount | Decimal |
Amount to defer |
| PostingDate | Date |
Posting date for the deferral |
| Description | Text[100] |
Description for the deferral schedule |
| CurrencyCode | Code[10] |
Currency code for foreign currency handling |
| AdjustStartDate | Boolean |
Whether to adjust the start date based on template settings |
CreateScheduleFromGL
Creates posted deferral records from a general journal line's deferral schedule. Transfers the deferral header and lines to posted tables and links them to the posted general ledger entry.
procedure CreateScheduleFromGL(GenJournalLine: Record "Gen. Journal Line", FirstEntryNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| GenJournalLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
General journal line being posted |
| FirstEntryNo | Integer |
First G/L entry number created from the journal line |
DeferralCodeOnValidate
Validates and creates/updates a deferral schedule when a deferral code is entered or changed. Removes existing schedule if the code is cleared.
procedure DeferralCodeOnValidate(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, Amount: Decimal, PostingDate: Date, Description: Text[100], CurrencyCode: Code[10])
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code being validated |
| DeferralDocType | Integer |
Type of document containing the deferral |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
| Amount | Decimal |
Amount to defer |
| PostingDate | Date |
Posting date for the deferral |
| Description | Text[100] |
Description for the deferral schedule |
| CurrencyCode | Code[10] |
Currency code for foreign currency handling |
DeferralCodeOnDelete
Removes a deferral schedule when a deferral code is deleted or cleared. Deletes the header and all associated deferral lines.
procedure DeferralCodeOnDelete(DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralDocType | Integer |
Type of document containing the deferral |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
OpenLineScheduleEdit
Opens the deferral schedule editing page for a specific line. Creates a new schedule if one doesn't exist, or allows editing of an existing schedule.
procedure OpenLineScheduleEdit(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, Amount: Decimal, PostingDate: Date, Description: Text[100], CurrencyCode: Code[10]): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code |
| DeferralDocType | Integer |
Type of document containing the deferral |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
| Amount | Decimal |
Amount to defer |
| PostingDate | Date |
Posting date for the deferral |
| Description | Text[100] |
Description for the deferral schedule |
| CurrencyCode | Code[10] |
Currency code for foreign currency handling |
Returns
| Type | Description |
|---|---|
| Boolean |
True if changes were made to the schedule, false otherwise |
OpenLineScheduleView
Opens the deferral schedule view page for posted/archived deferrals in read-only mode.
procedure OpenLineScheduleView(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code |
| DeferralDocType | Integer |
Type of document containing the deferral |
| GenJnlTemplateName | Code[10] |
General Journal Template name for G/L deferrals |
| GenJnlBatchName | Code[10] |
General Journal Batch name for G/L deferrals |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| LineNo | Integer |
Line number within the source document |
OpenLineScheduleArchive
Opens the archived deferral schedule view page for document archive scenarios.
procedure OpenLineScheduleArchive(DeferralCode: Code[10], DeferralDocType: Integer, DocumentType: Integer, DocumentNo: Code[20], DocNoOccurence: Integer, VersionNo: Integer, LineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code |
| DeferralDocType | Integer |
Type of document containing the deferral |
| DocumentType | Integer |
Document type ID from the source document |
| DocumentNo | Code[20] |
Document number from the source document |
| DocNoOccurence | Integer |
Document number occurrence for archive |
| VersionNo | Integer |
Version number for archive |
| LineNo | Integer |
Line number within the source document |
RoundDeferralAmount
Rounds deferral amounts to appropriate precision based on currency settings. Handles both LCY and foreign currency amounts with proper rounding.
procedure RoundDeferralAmount(var DeferralHeader: Record "Deferral Header", CurrencyCode: Code[10], CurrencyFactor: Decimal, PostingDate: Date, var AmtToDefer: Decimal, var AmtToDeferLCY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header containing schedule information |
| CurrencyCode | Code[10] |
Currency code for the amounts |
| CurrencyFactor | Decimal |
Exchange rate factor for currency conversion |
| PostingDate | Date |
Date for currency exchange rate lookup |
| AmtToDefer | Decimal |
Amount to defer (will be updated with rounded value) |
| AmtToDeferLCY | Decimal |
LCY amount to defer (will be updated with rounded value) |
InitializeDeferralHeaderAndSetPostDate
Initializes a deferral line record with header information and sets the appropriate posting date. Handles period-based date calculations using accounting periods.
procedure InitializeDeferralHeaderAndSetPostDate(var DeferralLine: Record "Deferral Line", DeferralHeader: Record "Deferral Header", PeriodicCount: Integer, var PostDate: Date)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to initialize |
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header containing source information |
| PeriodicCount | Integer |
Current period number in the deferral schedule |
| PostDate | Date |
Posting date that will be updated based on period calculations |
GetDeferralStartDate
Gets the start date for a deferral from existing schedule or calculates from template settings. Used to maintain consistency when adjusting existing deferrals.
procedure GetDeferralStartDate(DeferralDocType: Integer, RecordDocumentType: Integer, RecordDocumentNo: Code[20], RecordLineNo: Integer, DeferralCode: Code[10], PostingDate: Date): Date
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralDocType | Integer |
Type of document containing the deferral |
| RecordDocumentType | Integer |
Document type ID from the source document |
| RecordDocumentNo | Code[20] |
Document number from the source document |
| RecordLineNo | Integer |
Line number within the source document |
| DeferralCode | Code[10] |
Deferral template code |
| PostingDate | Date |
Default posting date if no template or schedule exists |
Returns
| Type | Description |
|---|---|
| Date |
Start date for the deferral schedule |
AdjustTotalAmountForDeferrals
Adjusts total amounts for deferral posting by subtracting deferred amounts from totals. Handles both LCY and ACY amounts with VAT base calculations.
procedure AdjustTotalAmountForDeferrals(DeferralCode: Code[10], var AmtToDefer: Decimal, var AmtToDeferACY: Decimal, var TotalAmount: Decimal, var TotalAmountACY: Decimal, var TotalVATBase: Decimal, var TotalVATBaseACY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code, blank if no deferral |
| AmtToDefer | Decimal |
Amount being deferred (may be zeroed if fully deferred) |
| AmtToDeferACY | Decimal |
ACY amount being deferred |
| TotalAmount | Decimal |
Total amount to adjust |
| TotalAmountACY | Decimal |
Total ACY amount to adjust |
| TotalVATBase | Decimal |
VAT base amount to set |
| TotalVATBaseACY | Decimal |
ACY VAT base amount to set |
AdjustTotalAmountForDeferrals
Adjusts total amounts for deferral posting including discount handling. Extended version with discount amount parameters.
procedure AdjustTotalAmountForDeferrals(DeferralCode: Code[10], var AmtToDefer: Decimal, var AmtToDeferACY: Decimal, var TotalAmount: Decimal, var TotalAmountACY: Decimal, var TotalVATBase: Decimal, var TotalVATBaseACY: Decimal, DiscountAmount: Decimal, DiscountAmountACY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code, blank if no deferral |
| AmtToDefer | Decimal |
Amount being deferred (may be zeroed if fully deferred) |
| AmtToDeferACY | Decimal |
ACY amount being deferred |
| TotalAmount | Decimal |
Total amount to adjust |
| TotalAmountACY | Decimal |
Total ACY amount to adjust |
| TotalVATBase | Decimal |
VAT base amount to set |
| TotalVATBaseACY | Decimal |
ACY VAT base amount to set |
| DiscountAmount | Decimal |
Discount amount to consider |
| DiscountAmountACY | Decimal |
ACY discount amount to consider |
AdjustTotalAmountForDeferralsNoBase
Adjusts total amounts for deferral posting without VAT base calculations. Simplified version for scenarios where VAT base is not required.
procedure AdjustTotalAmountForDeferralsNoBase(DeferralCode: Code[10], var AmtToDefer: Decimal, var AmtToDeferACY: Decimal, var TotalAmount: Decimal, var TotalAmountACY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code, blank if no deferral |
| AmtToDefer | Decimal |
Amount being deferred (may be zeroed if fully deferred) |
| AmtToDeferACY | Decimal |
ACY amount being deferred |
| TotalAmount | Decimal |
Total amount to adjust |
| TotalAmountACY | Decimal |
Total ACY amount to adjust |
AdjustTotalAmountForDeferralsNoBase
Adjusts total amounts for deferral posting without VAT base calculations, including discount handling. Extended version with discount amount parameters.
procedure AdjustTotalAmountForDeferralsNoBase(DeferralCode: Code[10], var AmtToDefer: Decimal, var AmtToDeferACY: Decimal, var TotalAmount: Decimal, var TotalAmountACY: Decimal, DiscountAmount: Decimal, DiscountAmountACY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code, blank if no deferral |
| AmtToDefer | Decimal |
Amount being deferred (may be zeroed if fully deferred) |
| AmtToDeferACY | Decimal |
ACY amount being deferred |
| TotalAmount | Decimal |
Total amount to adjust |
| TotalAmountACY | Decimal |
Total ACY amount to adjust |
| DiscountAmount | Decimal |
Discount amount to consider |
| DiscountAmountACY | Decimal |
ACY discount amount to consider |
CheckDeferralConditionForGenJournal
Validates general journal line conditions for deferral usage. Ensures source codes are properly configured for deferral processing.
procedure CheckDeferralConditionForGenJournal(var GenJournalLine: Record "Gen. Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| GenJournalLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
General journal line to validate |
ShowGenJournalTemplate
Opens the General Journal Templates page filtered to the template from the error context. Action method for error handling in deferral validation.
procedure ShowGenJournalTemplate(ErrorInfo: ErrorInfo)
Parameters
| Name | Type | Description |
|---|---|---|
| ErrorInfo | ErrorInfo |
Error information containing the journal line context |
ShowSourceCodeSetup
Opens the Source Code Setup page for configuring source codes. Action method for error handling in deferral validation.
procedure ShowSourceCodeSetup(ErrorInfo: ErrorInfo)
Parameters
| Name | Type | Description |
|---|---|---|
| ErrorInfo | ErrorInfo |
Error information for context |
CreateCopyOfDeferralSchedule
Creates a copy of an existing deferral schedule for a new source line. Used when copying document lines to maintain consistent deferral schedules.
procedure CreateCopyOfDeferralSchedule(DeferralHeader: Record "Deferral Header", NewSourceLineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Source deferral header to copy from |
| NewSourceLineNo | Integer |
New line number for the copied schedule |
Events
OnAfterCalculateDaysPerPeriod
Integration event raised after calculating deferral amounts using days per period method. Enables custom processing or adjustments to deferral calculations.
[IntegrationEvent(False,False)]
local procedure OnAfterCalculateDaysPerPeriod(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record with calculated amounts |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateDaysPerPeriod procedure after completing days-based deferral calculations.
OnAfterCalculateEqualPerPeriod
Integration event raised after calculating deferral amounts using equal per period method. Enables custom processing or adjustments to equal period deferral calculations.
[IntegrationEvent(False,False)]
local procedure OnAfterCalculateEqualPerPeriod(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record with calculated amounts |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateEqualPerPeriod procedure after completing equal period deferral calculations.
OnAfterCalculateStraightline
Integration event raised after calculating deferral amounts using straight-line method. Enables custom processing or adjustments to straight-line deferral calculations.
[IntegrationEvent(False,False)]
local procedure OnAfterCalculateStraightline(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record with calculated amounts |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateStraightline procedure after completing straight-line deferral calculations.
OnAfterCalculateUserDefined
Integration event raised after calculating deferral amounts using user-defined method. Enables custom processing or adjustments to user-defined deferral calculations.
[IntegrationEvent(False,False)]
local procedure OnAfterCalculateUserDefined(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record with calculated amounts |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateUserDefined procedure after completing user-defined deferral calculations.
OnAfterCreateDeferralSchedule
Integration event raised after creating the complete deferral schedule. Enables custom processing or validation after schedule generation is complete.
[IntegrationEvent(False,False)]
local procedure OnAfterCreateDeferralSchedule(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template", CalcMethod: Enum "Deferral Calculation Method")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record for the created schedule |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record representing the schedule lines |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template used for schedule creation |
| CalcMethod | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" |
Calculation method used for the schedule |
Remarks
Raised from CreateDeferralSchedule procedure after completing schedule creation.
OnAfterCreateScheduleFromGL
Integration event raised after creating deferral schedule from general journal line posting. Enables custom processing or field updates after G/L deferral schedule creation.
[IntegrationEvent(False,False)]
local procedure OnAfterCreateScheduleFromGL(var GenJournalLine: Record "Gen. Journal Line", var PostedDeferralHeader: Record "Posted Deferral Header")
Parameters
| Name | Type | Description |
|---|---|---|
| GenJournalLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
General journal line that was posted |
| PostedDeferralHeader | Table Microsoft.Finance.Deferral."Posted Deferral Header" |
Posted deferral header created from the journal line |
Remarks
Raised from CreateScheduleFromGL procedure after creating posted deferral records.
OnAfterSetStartDate
Integration event raised after setting the start date for deferral calculations. Enables custom start date logic or adjustments based on deferral template settings.
[IntegrationEvent(False,False)]
local procedure OnAfterSetStartDate(DeferralTemplate: Record "Deferral Template", var StartDate: Date, var AdjustedStartDate: Date)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing start date calculation rules |
| StartDate | Date |
Original start date for the deferral |
| AdjustedStartDate | Date |
Adjusted start date for calculations (can be modified by subscribers) |
Remarks
Raised from SetStartDate procedure after calculating adjusted start date.
OnBeforeCalculateDaysPerPeriod
Integration event raised before calculating deferral amounts using days per period method. Enables custom preprocessing or parameter modification before days-based calculations.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateDaysPerPeriod(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be calculated |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateDaysPerPeriod procedure before starting days-based deferral calculations.
OnBeforeCalculateEqualPerPeriod
Integration event raised before calculating deferral amounts using equal per period method. Enables custom preprocessing or parameter modification before equal period calculations.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateEqualPerPeriod(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be calculated |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateEqualPerPeriod procedure before starting equal period deferral calculations.
OnBeforeCalculateStraightline
Integration event raised before calculating deferral amounts using straight-line method. Enables custom preprocessing or parameter modification before straight-line calculations.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateStraightline(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be calculated |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateStraightline procedure before starting straight-line deferral calculations.
OnBeforeCalculateUserDefined
Integration event raised before calculating deferral amounts using user-defined method. Enables custom preprocessing or parameter modification before user-defined calculations.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateUserDefined(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be calculated |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
Remarks
Raised from CalculateUserDefined procedure before starting user-defined deferral calculations.
OnBeforeCreateDeferralSchedule
Integration event raised before creating a deferral schedule with comprehensive parameters. Enables custom schedule creation logic or parameter validation before schedule generation.
[IntegrationEvent(False,False)]
local procedure OnBeforeCreateDeferralSchedule(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, AmountToDefer: Decimal, CalcMethod: Enum "Deferral Calculation Method", var StartDate: Date, var NoOfPeriods: Integer, ApplyDeferralPercentage: Boolean, DeferralDescription: Text[100], var AdjustStartDate: Boolean, CurrencyCode: Code[10], var IsHandled: Boolean, var RedistributeDeferralSchedule: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code for the schedule |
| DeferralDocType | Integer |
Document type for the deferral (G/L, Sales, Purchase) |
| GenJnlTemplateName | Code[10] |
General journal template name if applicable |
| GenJnlBatchName | Code[10] |
General journal batch name if applicable |
| DocumentType | Integer |
Document type identifier |
| DocumentNo | Code[20] |
Document number for the deferral |
| LineNo | Integer |
Line number within the document |
| AmountToDefer | Decimal |
Total amount to be deferred |
| CalcMethod | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" |
Calculation method for the schedule |
| StartDate | Date |
Start date for the deferral schedule |
| NoOfPeriods | Integer |
Number of periods for the deferral |
| ApplyDeferralPercentage | Boolean |
Whether to apply percentage-based deferrals |
| DeferralDescription | Text[100] |
Description for the deferral schedule |
| AdjustStartDate | Boolean |
Whether to adjust the start date |
| CurrencyCode | Code[10] |
Currency code for the deferral |
| IsHandled | Boolean |
Set to true to skip standard schedule creation |
| RedistributeDeferralSchedule | Boolean |
Whether to redistribute the schedule |
Remarks
Raised from CreateDeferralSchedule procedure before creating deferral header and lines.
OnBeforeDeferralCodeOnValidate
Integration event raised before validating deferral code input. Enables custom deferral code validation logic or preprocessing.
[IntegrationEvent(False,False)]
local procedure OnBeforeDeferralCodeOnValidate(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, Amount: Decimal, PostingDate: Date, Description: Text[100], CurrencyCode: Code[10], var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code being validated |
| DeferralDocType | Integer |
Document type for the deferral |
| GenJnlTemplateName | Code[10] |
General journal template name if applicable |
| GenJnlBatchName | Code[10] |
General journal batch name if applicable |
| DocumentType | Integer |
Document type identifier |
| DocumentNo | Code[20] |
Document number for the deferral |
| LineNo | Integer |
Line number within the document |
| Amount | Decimal |
Deferral amount |
| PostingDate | Date |
Posting date for the deferral |
| Description | Text[100] |
Description for the deferral |
| CurrencyCode | Code[10] |
Currency code for the deferral |
| IsHandled | Boolean |
Set to true to skip standard deferral code validation |
Remarks
Raised from DeferralCodeOnValidate procedure before standard deferral code processing.
OnBeforePostedDeferralHeaderInsert
Integration event raised before inserting posted deferral header record. Enables custom field updates or validation before posted deferral header creation.
[IntegrationEvent(False,False)]
local procedure OnBeforePostedDeferralHeaderInsert(var PostedDeferralHeader: Record "Posted Deferral Header", GenJournalLine: Record "Gen. Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| PostedDeferralHeader | Table Microsoft.Finance.Deferral."Posted Deferral Header" |
Posted deferral header record to be inserted |
| GenJournalLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
Source general journal line for the deferral |
Remarks
Raised from CreateScheduleFromGL procedure before inserting posted deferral header.
OnBeforePostedDeferralLineInsert
Integration event raised before inserting posted deferral line record. Enables custom field updates or validation before posted deferral line creation.
[IntegrationEvent(False,False)]
local procedure OnBeforePostedDeferralLineInsert(var PostedDeferralLine: Record "Posted Deferral Line", GenJournalLine: Record "Gen. Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| PostedDeferralLine | Table Microsoft.Finance.Deferral."Posted Deferral Line" |
Posted deferral line record to be inserted |
| GenJournalLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
Source general journal line for the deferral |
Remarks
Raised from CreateScheduleFromGL procedure before inserting posted deferral lines.
OnBeforeOpenLineScheduleEdit
Integration event raised before opening deferral schedule editor for line editing. Enables custom preprocessing or parameter modification before schedule editing.
[IntegrationEvent(False,False)]
local procedure OnBeforeOpenLineScheduleEdit(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, Amount: Decimal, PostingDate: Date, Description: Text[100], CurrencyCode: Code[10])
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code for the schedule |
| DeferralDocType | Integer |
Document type for the deferral |
| GenJnlTemplateName | Code[10] |
General journal template name if applicable |
| GenJnlBatchName | Code[10] |
General journal batch name if applicable |
| DocumentType | Integer |
Document type identifier |
| DocumentNo | Code[20] |
Document number for the deferral |
| LineNo | Integer |
Line number within the document |
| Amount | Decimal |
Deferral amount |
| PostingDate | Date |
Posting date for the deferral |
| Description | Text[100] |
Description for the deferral |
| CurrencyCode | Code[10] |
Currency code for the deferral |
Remarks
Raised from OpenLineScheduleEdit procedure before opening deferral schedule page.
OnAfterAdjustTotalAmountForDeferrals
Integration event raised after adjusting total amounts for deferral calculations. Enables custom processing or validation after deferral amount adjustments.
[IntegrationEvent(False,False)]
local procedure OnAfterAdjustTotalAmountForDeferrals(DeferralCode: Code[10], var AmtToDefer: Decimal, var AmtToDeferACY: Decimal, var TotalAmount: Decimal, var TotalAmountACY: Decimal, DiscountAmount: Decimal, DiscountAmountACY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code |
| AmtToDefer | Decimal |
Amount to defer in local currency |
| AmtToDeferACY | Decimal |
Amount to defer in additional currency |
| TotalAmount | Decimal |
Total amount in local currency |
| TotalAmountACY | Decimal |
Total amount in additional currency |
| DiscountAmount | Decimal |
Discount amount in local currency |
| DiscountAmountACY | Decimal |
Discount amount in additional currency |
Remarks
Raised from AdjustTotalAmountForDeferrals procedure after calculating adjusted amounts.
OnBeforeCalcDeferralNoOfPeriods
Integration event raised before calculating number of deferral periods. Enables custom period calculation logic based on calculation method and start date.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalcDeferralNoOfPeriods(CalcMethod: Enum "Deferral Calculation Method", var NoOfPeriods: Integer, StartDate: Date, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| CalcMethod | Enum Microsoft.Finance.Deferral."Deferral Calculation Method" |
Calculation method for determining periods |
| NoOfPeriods | Integer |
Number of periods (can be modified by subscribers) |
| StartDate | Date |
Start date for period calculation |
| IsHandled | Boolean |
Set to true to skip standard period calculation |
Remarks
Raised from CalcDeferralNoOfPeriods procedure before standard period calculation.
OnBeforeCheckPostingDate
Integration event raised before checking posting date validity for deferral lines. Enables custom posting date validation logic for deferral schedules.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPostingDate(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header context for validation |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line with posting date to validate |
| IsHandled | Boolean |
Set to true to skip standard posting date validation |
Remarks
Raised from CheckPostingDate procedure before standard date validation logic.
OnBeforeGetDeferralDescription
Integration event raised before generating deferral description text. Enables custom description logic for deferral schedule entries.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetDeferralDescription(GenJnlBatchName: Code[10], DocumentNo: Code[20], Description: Text[100], var Result: Text[100], var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| GenJnlBatchName | Code[10] |
General journal batch name for context |
| DocumentNo | Code[20] |
Document number for the deferral |
| Description | Text[100] |
Source description text |
| Result | Text[100] |
Generated description result (can be modified by subscribers) |
| IsHandled | Boolean |
Set to true to skip standard description generation |
Remarks
Raised from GetDeferralDescription procedure before standard description generation.
OnCalculateEqualPerPeriodOnBeforeDeferralLineInsert
Integration event raised before inserting deferral line during equal per period calculation. Enables custom field updates or validation before line insertion.
[IntegrationEvent(False,False)]
local procedure OnCalculateEqualPerPeriodOnBeforeDeferralLineInsert(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header context for the calculation |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be inserted |
Remarks
Raised from CalculateEqualPerPeriod procedure before inserting each deferral line.
OnCalculateStraightlineOnAfterCalcSecondPeriodDate
Integration event raised after calculating the second period date in straight-line deferral calculations. Enables custom period date adjustments for straight-line deferral schedules.
[IntegrationEvent(False,False)]
local procedure OnCalculateStraightlineOnAfterCalcSecondPeriodDate(DeferralHeader: Record "Deferral Header", PostDate: Date, var FirstPeriodDate: Date, var SecondPeriodDate: Date)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| PostDate | Date |
Original posting date for the deferral |
| FirstPeriodDate | Date |
First period date for the deferral schedule |
| SecondPeriodDate | Date |
Second period date (can be modified by subscribers) |
Remarks
Raised from CalculateStraightline procedure after calculating the second period date.
OnCalculateStraightlineOnBeforeDeferralLineInsert
Integration event raised before inserting deferral line during straight-line calculation. Enables custom field updates or validation before line insertion.
[IntegrationEvent(False,False)]
local procedure OnCalculateStraightlineOnBeforeDeferralLineInsert(var DeferralLine: Record "Deferral Line", DeferralHeader: Record "Deferral Header")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be inserted |
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header context for the calculation |
Remarks
Raised from CalculateStraightline procedure before inserting each deferral line.
OnCalculateStraightlineOnBeforeCalcPeriodicDeferralAmount
Integration event raised before calculating periodic deferral amount in straight-line method. Enables custom amount calculation logic for straight-line deferral periods.
[IntegrationEvent(False,False)]
local procedure OnCalculateStraightlineOnBeforeCalcPeriodicDeferralAmount(var DeferralHeader: Record "Deferral Header", var PeriodicDeferralAmount: Decimal, AmountRoundingPrecision: Decimal, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| PeriodicDeferralAmount | Decimal |
Periodic deferral amount (can be modified by subscribers) |
| AmountRoundingPrecision | Decimal |
Rounding precision for amount calculations |
| IsHandled | Boolean |
Set to true to skip standard periodic amount calculation |
Remarks
Raised from CalculateStraightline procedure before calculating periodic deferral amounts.
OnCalculateDaysPerPeriodOnAfterCalcEndDate
Integration event raised after calculating end date for days per period deferral method. Enables custom end date adjustments for days-based deferral calculations.
[IntegrationEvent(False,False)]
local procedure OnCalculateDaysPerPeriodOnAfterCalcEndDate(var DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line", DeferralTemplate: Record "Deferral Template", var EndDate: Date)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record containing calculation parameters |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record with calculated dates |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing calculation settings |
| EndDate | Date |
Calculated end date (can be modified by subscribers) |
Remarks
Raised from CalculateDaysPerPeriod procedure after calculating period end date.
OnCalculateDaysPerPeriodOnBeforeDeferralLineInsert
Integration event raised before inserting deferral line during days per period calculation. Enables custom field updates or validation before line insertion.
[IntegrationEvent(False,False)]
local procedure OnCalculateDaysPerPeriodOnBeforeDeferralLineInsert(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header context for the calculation |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be inserted |
Remarks
Raised from CalculateDaysPerPeriod procedure before inserting each deferral line.
OnCalculateUserDefinedOnBeforeDeferralLineInsert
Integration event raised before inserting deferral line during user-defined calculation. Enables custom field updates or validation before line insertion.
[IntegrationEvent(False,False)]
local procedure OnCalculateUserDefinedOnBeforeDeferralLineInsert(DeferralHeader: Record "Deferral Header", var DeferralLine: Record "Deferral Line")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header context for the calculation |
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to be inserted |
Remarks
Raised from CalculateUserDefined procedure before inserting each deferral line.
OnSetDeferralRecordsOnBeforeDeferralHeaderModify
Integration event raised before modifying deferral header during record setup. Enables custom field updates or validation before deferral header modification.
[IntegrationEvent(False,False)]
local procedure OnSetDeferralRecordsOnBeforeDeferralHeaderModify(var DeferralHeader: Record "Deferral Header")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header record to be modified |
Remarks
Raised from SetDeferralRecords procedure before modifying deferral header.
OnBeforeIsDateNotAllowed
Integration event raised before checking if a posting date is allowed for deferral processing. Enables custom date validation logic for deferral schedule processing.
[IntegrationEvent(False,False)]
local procedure OnBeforeIsDateNotAllowed(PostingDate: Date, var Result: Boolean, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| PostingDate | Date |
Posting date to be validated |
| Result | Boolean |
Validation result (can be modified by subscribers) |
| IsHandled | Boolean |
Set to true to skip standard date validation |
Remarks
Raised from IsDateNotAllowed procedure before standard posting date validation.
OnBeforeUpdateDeferralLineDescription
Integration event raised before updating deferral line description during schedule creation. Enables custom description generation logic for deferral line entries.
[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateDeferralLineDescription(var DeferralLine: Record "Deferral Line", DeferralHeader: Record "Deferral Header", DeferralTemplate: Record "Deferral Template", PostDate: Date, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record to update |
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" |
Deferral header context for description generation |
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template containing description settings |
| PostDate | Date |
Posting date for the deferral line |
| IsHandled | Boolean |
Set to true to skip standard description update |
Remarks
Raised from UpdateDeferralLineDescription procedure before updating line description.
OnBeforeValidateDeferralTemplate
Integration event raised before validating deferral template settings. Enables custom validation logic for deferral template configuration.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateDeferralTemplate(DeferralTemplate: Record "Deferral Template", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralTemplate | Table Microsoft.Finance.Deferral."Deferral Template" |
Deferral template record to validate |
| IsHandled | Boolean |
Set to true to skip standard template validation |
Remarks
Raised from ValidateDeferralTemplate procedure before standard template validation.
OnInitializeDeferralHeaderAndSetPostDateAfterInitDeferralLine
Integration event raised after initializing deferral line during deferral header initialization. Enables custom field updates or additional processing after deferral line setup.
[IntegrationEvent(False,False)]
local procedure OnInitializeDeferralHeaderAndSetPostDateAfterInitDeferralLine(var DeferralLine: Record "Deferral Line")
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralLine | Table Microsoft.Finance.Deferral."Deferral Line" |
Deferral line record that was initialized |
Remarks
Raised from InitializeDeferralHeaderAndSetPostDate procedure after initializing deferral line.
OnOpenLineScheduleEditOnBeforeDeferralScheduleSetParameters
[IntegrationEvent(False,False)]
local procedure OnOpenLineScheduleEditOnBeforeDeferralScheduleSetParameters(var DeferralSchedule: Page "Deferral Schedule", DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], DeferralHeader: Record "Deferral Header", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralSchedule | Page Microsoft.Finance.Deferral."Deferral Schedule" | |
| DeferralDocType | Integer | |
| GenJnlTemplateName | Code[10] | |
| GenJnlBatchName | Code[10] | |
| DocumentType | Integer | |
| DocumentNo | Code[20] | |
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" | |
| IsHandled | Boolean |
OnBeforeCheckDeferralConditionForGenJournal
Integration event raised before checking deferral conditions for general journal lines. Enables custom deferral condition logic for journal line processing.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckDeferralConditionForGenJournal(var GenJournalLine: Record "Gen. Journal Line", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| GenJournalLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
General journal line to check for deferral conditions |
| IsHandled | Boolean |
Set to true to skip standard deferral condition checking |
Remarks
Raised from CheckDeferralConditionForGenJournal procedure before standard condition validation.
OnBeforeRemoveOrSetDeferralSchedule
Integration event raised before removing or setting up deferral schedule for a document line. Enables custom deferral schedule management logic and validation.
[IntegrationEvent(False,False)]
local procedure OnBeforeRemoveOrSetDeferralSchedule(DeferralCode: Code[10], DeferralDocType: Integer, GenJnlTemplateName: Code[10], GenJnlBatchName: Code[10], DocumentType: Integer, DocumentNo: Code[20], LineNo: Integer, Amount: Decimal, PostingDate: Date, Description: Text[100], CurrencyCode: Code[10], AdjustStartDate: Boolean, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralCode | Code[10] |
Deferral template code for the schedule |
| DeferralDocType | Integer |
Document type for the deferral |
| GenJnlTemplateName | Code[10] |
General journal template name if applicable |
| GenJnlBatchName | Code[10] |
General journal batch name if applicable |
| DocumentType | Integer |
Document type identifier |
| DocumentNo | Code[20] |
Document number for the deferral |
| LineNo | Integer |
Line number within the document |
| Amount | Decimal |
Deferral amount |
| PostingDate | Date |
Posting date for the deferral |
| Description | Text[100] |
Description for the deferral |
| CurrencyCode | Code[10] |
Currency code for the deferral |
| AdjustStartDate | Boolean |
Whether to adjust the start date |
| IsHandled | Boolean |
Set to true to skip standard deferral schedule processing |
Remarks
Raised from RemoveOrSetDeferralSchedule procedure before standard schedule management.
OnBeforeRoundDeferralAmount
[IntegrationEvent(False,False)]
local procedure OnBeforeRoundDeferralAmount(var DeferralHeader: Record "Deferral Header", CurrencyCode: Code[10], CurrencyFactor: Decimal, PostingDate: Date, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DeferralHeader | Table Microsoft.Finance.Deferral."Deferral Header" | |
| CurrencyCode | Code[10] | |
| CurrencyFactor | Decimal | |
| PostingDate | Date | |
| IsHandled | Boolean |