Codeunit 432 "Consolidate"
Base Application · Microsoft.Finance.Consolidation
Across versions
- BC23present
- BC241 procedures changed
- BC251 events added
- BC261 events added
- BC27unchanged
- BC281 events added
- BC29-30unchanged
Neighbourhood 11 connected objects and pages
Base Application · Microsoft.Finance.Consolidation · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Business Unit |
| Permissions | TableData “G/L Entry” = rimd, tabledata “Analysis View” = r |
Events published
OnBeforeGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line")(integration): Integration event raised before posting a General Journal line during consolidation.OnBeforeInsertGLEntry(var SubsidGLEntry: Record "G/L Entry"; GLEntry: Record "G/L Entry")(integration): Integration event raised before inserting a subsidiary G/L Entry into consolidation buffer.OnBeforeShowAnalysisViewEntryMessage(var AnalysisViewEntriesDeleted: Boolean; var IsHandled: Boolean)(integration): Integration event raised before displaying analysis view entry deletion message during consolidation.OnClearPreviousConsolidationOnBeforeCheckAmountArray(var DeletedAmountsArray: array[500] of Decimal; var DeletedDatesArray: array[500] of Date)(integration): Integration event raised during previous consolidation clearing before checking amount arrays.OnClearPreviousConsolidationOnBeforeUpdateAmountArray(var ConsolidatedGLEntry: Record "G/L Entry"; var DeletedAmountsArray: array[500] of Decimal; var DeletedDatesArray: array[500] of Date; var DeletedIdx: Integer; var IsHandled: Boolean)(integration): Integration event raised during previous consolidation clearing before updating amount arrays.OnUpdateGLEntryDimSetIDOnAfterAssignDimensionSetID(var TempSubsidDimBuf: Record "Dimension Buffer" temporary)(integration): Integration event raised after assigning dimension set ID during G/L Entry dimension processing.OnBeforeUpdateTempGLEntry(var TempSubsidGLEntry: Record "G/L Entry"; var GenJnlLine: Record "Gen. Journal Line"; var CurErrorIdx: Integer; var ErrorText: array[500] of Text; TestMode: Boolean; var WindowDialog: Dialog)(integration): Integration event raised before updating temporary G/L entry during consolidation processing. Enables custom validation and modification of subsidiary G/L entry data before consolidation.OnAfterUpdateTempGLEntry(var BusUnit: Record "Business Unit"; var TempSubsidGLEntry: Record "G/L Entry")(integration): Integration event raised after updating temporary G/L entry during consolidation processing. Enables custom post-processing of consolidated subsidiary G/L entry data.OnAfterCreateAndPostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; ConsolidAmount: Decimal; CurrencyACY: Code[10])(integration): Integration event raised after creating and posting general journal line during consolidation. Enables custom post-processing of consolidated journal entries and currency handling.OnBeforeOnRun(var BusinessUnit: Record "Business Unit")(integration): Integration event raised before consolidation processing begins for a business unit. Enables custom initialization and validation before consolidation execution.OnBeforePostBalancingEntries(var GenJnlLine: Record "Gen. Journal Line")(integration): Integration event raised before posting balancing entries during consolidation. Enables custom modification of balancing journal entries before posting.OnBeforeWindowUpdate(var GenJnlLine: Record "Gen. Journal Line")(integration): Integration event raised before updating consolidation progress window during processing. Enables custom progress tracking and status display modifications.OnAfterBusUnitModify(var Rec: Record "Business Unit"; var BusUnit: Record "Business Unit")(integration): Integration event raised after modifying Business Unit record during consolidation processing. Enables custom post-processing of business unit configuration changes.OnBeforeSetSelectedDim(var TempSelectedDim: Record "Selected Dimension"; var SelectedDim: Record "Selected Dimension"; var SkipAllDimensions: Boolean; var IsHandled: Boolean)(integration): Integration event raised before setting selected dimensions during consolidation processing. Enables custom dimension selection logic and dimension filtering modifications.OnAfterGetGLAccount(var TempSubsidGLAcc: Record "G/L Account")(integration): Integration event raised after retrieving G/L account during consolidation processing. Enables custom post-processing of subsidiary G/L account data.OnBeforeClearPreviousConsolidation(var ConsolidGLEntry: Record "G/L Entry")(integration): Integration event raised before clearing previous consolidation entries. Enables custom logic for handling existing consolidated G/L entries before new consolidation.OnBeforeUpdatePriorPeriodBalances(var GenJnlLine: Record "Gen. Journal Line")(integration): Integration event raised before updating prior period balances during consolidation. Enables custom handling of prior period balance adjustments and journal line modifications.OnBeforeConsolidGLEntryFindSet(var ConsolidGLEntry: Record "G/L Entry")(integration): Integration event raised before finding consolidated G/L entries during consolidation processing. Enables custom filtering and selection criteria for consolidated entry processing.OnBeforeConsolidGLAccFindSet(var ConsolidGLAcc: Record "G/L Account")(integration): Integration event raised before finding consolidated G/L accounts during consolidation processing. Enables custom filtering and selection criteria for consolidated account processing.OnBeforeGenJnlPostLineTmp(var GenJnlLine: Record "Gen. Journal Line")(integration): Integration event raised before posting general journal line in temporary mode during consolidation. Enables custom modification of journal line before temporary posting processing.OnBeforeTempDimSetEntryDelete(var GenJnlLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry")(integration): Integration event raised before deleting temporary dimension set entries during consolidation. Enables custom handling of dimension cleanup and journal line dimension processing.OnBeforeTempGenJnlLineInsert(var TempGenJnlLine: Record "Gen. Journal Line")(integration): Integration event raised before inserting temporary general journal line during consolidation. Enables custom modification of journal line before insertion into temporary processing table.OnAfterCheckPostingDate(var GlEntry: Record "G/L Entry"; var IsError: Boolean; var ErrorMsg: Text)(integration): Integration event raised after checking posting date validation during consolidation. Enables custom posting date validation logic and error handling.OnBeforeUpdateTempGLEntryProcedure(var TempGLEntry: Record "G/L Entry"; GLEntry: Record "G/L Entry"; var IsHandled: Boolean; TempDimensionBufferIn: Record "Dimension Buffer")(integration): Integration event raised before updating temporary G/L entry during consolidation procedure. Enables custom modification of G/L entry data and dimension buffer handling.OnRunOnAfterCalcShouldClearPreviousConsolidation(var ShouldClearPreviousConsolidation: Boolean)(integration): Integration event raised after calculating whether to clear previous consolidation. Enables custom logic for determining consolidation clearing behavior.OnRunOnBeforeTempGLEntryLoop(var TempGLEntry: Record "G/L Entry"; TempSubsidGLAcc: Record "G/L Account")(integration): Integration event raised before starting temporary G/L entry processing loop during consolidation. Enables custom initialization logic before G/L entry iteration begins.OnRunOnBeforeWindowOpen(var WindowDialog: Dialog; var IsHandled: Boolean)(integration): Integration event raised before opening progress window during consolidation processing. Enables custom window handling and progress tracking modifications.OnRunOnBeforeInsertTempDimBuf(var TempDimensionBuffer: Record "Dimension Buffer"; var TempSubsidDimensionBuffer: Record "Dimension Buffer")(integration): Integration event raised before inserting temporary dimension buffer during consolidation. Enables custom dimension processing and modification before insertion.OnCreateAndPostGenJnlLineOnBeforeConsolidGLAccGet(var GenJournalLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry"; var BusinessUnit: Record "Business Unit"; var TempSubsidGLAccount: Record "G/L Account")(integration): Integration event raised before retrieving consolidated G/L account during journal line creation. Enables custom account mapping and G/L account selection logic.OnRunOnBeforeLoopTempSubsidGLEntry(var BusinessUnit: Record "Business Unit"; var TempSubsidGLAccount: Record "G/L Account")(integration): Integration event raised before starting subsidiary G/L entry processing loop. Enables custom initialization for business unit and G/L account processing.OnRunOnTempSubsidGLEntryLoopStart(var GenJournalLine: Record "Gen. Journal Line"; var BusinessUnit: Record "Business Unit"; var TempSubsidGLEntry: Record "G/L Entry")(integration): Integration event raised at the start of subsidiary G/L entry processing loop iteration. Enables custom processing for each G/L entry during consolidation.OnRunOnBeforeSetResidualAccount(var BusinessUnit: Record "Business Unit"; var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)(integration): Integration event raised before setting residual account during consolidation. Enables custom residual account logic and balancing entry handling.OnBeforeExportToXML(FileName: Text; var TempSubsidGLAccount: Record "G/L Account"; var TempSubsidGLEntry: Record "G/L Entry"; var TempSubsidDimensionBuffer: Record "Dimension Buffer"; var TempSubsidCurrencyExchangeRate: Record "Currency Exchange Rate"; var IsHandled: Boolean)(integration): Integration event raised before exporting consolidation data to XML format. Enables custom export processing and data transformation before XML generation.OnCheckAmountArrayOnBeforeReportError(var DeletedAmountsArray: array[500] of Decimal; var DeletedDatesArray: array[500] of Date; DeletedIndex: Integer; var IsHandled: Boolean)(integration): Integration event raised before reporting error during amount array validation. Enables custom error handling and validation logic for deleted consolidation amounts.OnBeforeImportFromXML(FileName: Text; var TempSubsidGLAccount: Record "G/L Account"; var TempSubsidGLEntry: Record "G/L Entry"; var TempSubsidDimensionBuffer: Record "Dimension Buffer"; var TempSubsidCurrencyExchangeRate: Record "Currency Exchange Rate"; var IsHandled: Boolean)(integration): Integration event raised before importing consolidation data from XML format. Enables custom import processing and data transformation from XML files.OnClearPreviousConsolidationOnAfterConsolidGLEntrySetFilters(var ConsolidGLEntry: Record "G/L Entry")(integration): Integration event raised after setting filters on consolidated G/L entries during previous consolidation clearing. Enables custom filtering logic for consolidated entry identification and processing.OnAfterSetGlobals(var ProductVersion: Code[10]; var FormatVersion: Code[10]; var CompanyName: Text[30]; var CurrencyLCY: Code[10]; var CurrencyACY: Code[10]; var CurrencyPCY: Code[10]; var CheckSum: Decimal; var StartingDate: Date; var EndingDate: Date)(integration): Integration event raised after setting global variables during consolidation processing. Enables custom modification of consolidation parameters and global settings.OnImportFromXMLOnBeforeSelectAllImportedDimensions(var ProductVersion: Code[10]; var FormatVersion: Code[10]; var CompanyName: Text[30]; var CurrencyLCY: Code[10]; var CurrencyACY: Code[10]; var CurrencyPCY: Code[10]; var CheckSum: Decimal; var StartingDate: Date; var EndingDate: Date)(integration): Integration event raised before selecting all imported dimensions during XML import processing. Enables custom dimension selection logic and processing during consolidation data import.OnUpdatePriorPeriodBalancesOnBeforePostBalanceAdjustment(var GLAccount: Record "G/L Account")+ BC25 (integration): Integration event raised before posting balance adjustment entries during prior period balance updates. Enables custom G/L account processing and balance adjustment logic during consolidation.OnTestGLAccountsOnBeforeTestForConflicts(var TempSubsidGLAcc: Record "G/L Account" temporary)+ BC26 (integration): Integration event raised before testing for G/L account conflicts during consolidation validation. Enables custom validation logic for subsidiary G/L account compatibility and conflict resolution.OnClearPreviousConsolidationOnBeforeModifyConsolidGLEntry(var ConsolidGLEntry: Record "G/L Entry")+ BC28 (integration): Integration event raised before modifying consolidated G/L entry during previous consolidation clearing. Enables custom modification of consolidated G/L entry data before clearing amounts.
Procedures
ValidateMaxNumberOfDaysInConsolidation(StartDate: Date; EndDate: Date): Boolean(internal)MaxNumberOfDaysInConsolidation(): Integer(internal)SetDocNo(NewDocNo: Code[20]): Sets the document number for consolidation entries that will be posted to the General Ledger.SetGenJnlBatch(NewGenJnlBatch: Record "Gen. Journal Batch"): Configures the General Journal batch for posting consolidation entries.SetSelectedDim(var SelectedDim: Record "Selected Dimension"): Configures dimension selection filter for consolidation processing and posting.SetGlobals(NewProductVersion: Code[10]; NewFormatVersion: Code[10]; NewCompanyName: Text[30]; NewCurrencyLCY: Code[10]; NewCurrencyACY: Code[10]; NewCurrencyPCY: Code[10]; NewCheckSum: Decimal; NewStartingDate: Date; NewEndingDate: Date): Initializes global variables for consolidation processing from subsidiary business unit data.InsertGLAccount(NewGLAccount: Record "G/L Account"): Adds a subsidiary G/L Account to the temporary consolidation account buffer for processing.InsertGLEntry(NewGLEntry: Record "G/L Entry"): Integer: Adds a subsidiary G/L Entry to the temporary consolidation entry buffer for processing.InsertEntryDim(NewDimBuf: Record "Dimension Buffer"; GLEntryNo: Integer): Adds dimension information for a subsidiary G/L Entry in the consolidation buffer.InsertExchRate(NewCurrExchRate: Record "Currency Exchange Rate"): Adds currency exchange rate information from subsidiary company to consolidation buffer.UpdateGLEntryDimSetID(): Updates dimension set IDs for all G/L entries in the consolidation buffer based on dimension data.CalcCheckSum(): Decimal: Calculates validation checksum for consolidation data integrity verification.ImportFromXML(FileName: Text)ExportToXML(FileName: Text)GetGlobals(var ImpProductVersion: Code[10]; var ImpFormatVersion: Code[10]; var ImpCompanyName: Text[30]; var ImpCurrencyLCY: Code[10]; var ImpCurrencyACY: Code[10]; var ImpCurrencyPCY: Code[10]; var ImpCheckSum: Decimal; var ImpStartingDate: Date; var ImpEndingDate: Date): Retrieves global consolidation variables for external processes and validation.SetTestMode(NewTestMode: Boolean): Enables test mode for consolidation processing to accumulate errors without stopping execution.GetAccumulatedErrors(var NumErrors: Integer; var Errors: array[100] of Text): Retrieves accumulated error messages when running in test mode.SelectAllImportedDimensions(): Automatically selects all dimensions that were imported from subsidiary data for consolidation processing.CreateAndPostGenJnlLine(GenJnlLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry"; var DimBuf: Record "Dimension Buffer")Δ BC24: Creates and posts a General Journal line for consolidation with currency translation and dimension processing.GetNumSubsidGLAcc(): Integer: Returns the count of subsidiary G/L accounts available for consolidation processing.Get1stSubsidGLAcc(var GlAccount: Record "G/L Account"): Boolean: Retrieves the first subsidiary G/L account for consolidation processing. Initializes account traversal and performs validation if running in test mode.GetNxtSubsidGLAcc(var GLAccount: Record "G/L Account"): Boolean: Retrieves the next subsidiary G/L account in consolidation processing sequence. Advances account traversal and performs validation if running in test mode.GetNumSubsidGLEntry(): Integer: Returns the count of subsidiary G/L entries for the current G/L account during consolidation. Filters entries by current G/L account number and posting date.Get1stSubsidGLEntry(var GLEntry: Record "G/L Entry"): Boolean: Retrieves the first subsidiary G/L entry for the current account in consolidation processing. Performs posting date validation and closes-date handling if in test mode.GetNxtSubsidGLEntry(var GLEntry: Record "G/L Entry"): Boolean: Retrieves the next subsidiary G/L entry for the current account in consolidation processing. Advances entry traversal and performs posting date validation if in test mode.GetGLAccounts(var TempGLAccount: Record "G/L Account" temporary)(internal)
Plus 19 local procedures.
Triggers
OnRun
Relations
- runs on Table 220 “Business Unit”
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 411 “Dimension Buffer Management” (6 calls:
OnRun → DeleteAllDimensions,OnRun → GetDimensions,UpdatePriorPeriodBalances → DeleteAllDimensions, …) - Codeunit 408 “DimensionManagement” (5 calls:
CreateAndPostGenJnlLine → GetDimensionSetID,CreateAndPostGenJnlLine → UpdateGlobalDimFromDimSetID,GenJnlPostLineTmp → UpdateGlobalDimFromDimSetID, …) - Codeunit 12 “Gen. Jnl.-Post Line” (1 call:
GenJnlPostLineFinally → RunWithCheck) - Codeunit 5700 “User Setup Management” (1 call:
ClearPreviousConsolidation → CheckAllowedPostingDate)
Called by
- Codeunit 102 “Import Consolidation from API” (10 calls:
GetAndSetCurrencyExchangeRates → InsertExchRate,GetAndSetGLEntries → InsertEntryDim,GetAndSetGLEntries → InsertGLEntry, …) - Report 92 “Import Consolidation from File” (8 calls:
OnPostReport → (object),OnPostReport → SetDocNo,OnPostReport → SetGenJnlBatch, …) - Report 15 “Consolidation - Test File” (4 calls:
OnPreReport → CalcCheckSum,OnPreReport → GetGlobals,OnPreReport → ImportFromXML, …) - Codeunit 110 “Consolidate Business Units” (2 calls:
ValidateDatesForConsolidation → MaxNumberOfDaysInConsolidation,ValidateDatesForConsolidation → ValidateMaxNumberOfDaysInConsolidation) - Report 91 “Export Consolidation” (2 calls:
WriteFile → InsertEntryDim,WriteFile → InsertGLEntry) - Codeunit 434 “Default Consolidation Method” (1 call:
Consolidate → (object))
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. 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: "Consolidate"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.