Codeunit Consolidate

ID 432
Namespace: Microsoft.Finance.Consolidation

Properties

Name Value
Permissions TableData "G/L Entry" = rimd, tabledata "Analysis View" = r
TableNo Table Microsoft.Finance.Consolidation."Business Unit"

Methods

SetDocNo

procedure SetDocNo(NewDocNo: Code[20])

Parameters

Name Type Description
NewDocNo Code[20]

SetGenJnlBatch

procedure SetGenJnlBatch(NewGenJnlBatch: Record "Gen. Journal Batch")

Parameters

Name Type Description
NewGenJnlBatch Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Batch"

SetSelectedDim

procedure SetSelectedDim(var SelectedDim: Record "Selected Dimension")

Parameters

Name Type Description
SelectedDim Table Microsoft.Finance.Dimension."Selected Dimension"

SetGlobals

procedure 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)

Parameters

Name Type Description
NewProductVersion Code[10]
NewFormatVersion Code[10]
NewCompanyName Text[30]
NewCurrencyLCY Code[10]
NewCurrencyACY Code[10]
NewCurrencyPCY Code[10]
NewCheckSum Decimal
NewStartingDate Date
NewEndingDate Date

InsertGLAccount

procedure InsertGLAccount(NewGLAccount: Record "G/L Account")

Parameters

Name Type Description
NewGLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

InsertGLEntry

procedure InsertGLEntry(NewGLEntry: Record "G/L Entry"): Integer

Parameters

Name Type Description
NewGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

Returns

Type Description
Integer

InsertEntryDim

procedure InsertEntryDim(NewDimBuf: Record "Dimension Buffer", GLEntryNo: Integer)

Parameters

Name Type Description
NewDimBuf Table Microsoft.Finance.Dimension."Dimension Buffer"
GLEntryNo Integer

InsertExchRate

procedure InsertExchRate(NewCurrExchRate: Record "Currency Exchange Rate")

Parameters

Name Type Description
NewCurrExchRate Table Microsoft.Finance.Currency."Currency Exchange Rate"

UpdateGLEntryDimSetID

procedure UpdateGLEntryDimSetID()

CalcCheckSum

procedure CalcCheckSum(): Decimal

Returns

Type Description
Decimal

GetGlobals

procedure 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)

Parameters

Name Type Description
ImpProductVersion Code[10]
ImpFormatVersion Code[10]
ImpCompanyName Text[30]
ImpCurrencyLCY Code[10]
ImpCurrencyACY Code[10]
ImpCurrencyPCY Code[10]
ImpCheckSum Decimal
ImpStartingDate Date
ImpEndingDate Date

SetTestMode

procedure SetTestMode(NewTestMode: Boolean)

Parameters

Name Type Description
NewTestMode Boolean

GetAccumulatedErrors

procedure GetAccumulatedErrors(var NumErrors: Integer, var Errors: array[100] of Text)

Parameters

Name Type Description
NumErrors Integer
Errors array[100] of Text

SelectAllImportedDimensions

procedure SelectAllImportedDimensions()

CreateAndPostGenJnlLine

procedure CreateAndPostGenJnlLine(GenJnlLine: Record "Gen. Journal Line", var GLEntry: Record "G/L Entry", var DimBuf: Record "Dimension Buffer")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
DimBuf Table Microsoft.Finance.Dimension."Dimension Buffer"

GetNumSubsidGLAcc

procedure GetNumSubsidGLAcc(): Integer

Returns

Type Description
Integer

Get1stSubsidGLAcc

procedure Get1stSubsidGLAcc(var GlAccount: Record "G/L Account"): Boolean

Parameters

Name Type Description
GlAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

Returns

Type Description
Boolean

GetNxtSubsidGLAcc

procedure GetNxtSubsidGLAcc(var GLAccount: Record "G/L Account"): Boolean

Parameters

Name Type Description
GLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

Returns

Type Description
Boolean

GetNumSubsidGLEntry

procedure GetNumSubsidGLEntry(): Integer

Returns

Type Description
Integer

Get1stSubsidGLEntry

procedure Get1stSubsidGLEntry(var GLEntry: Record "G/L Entry"): Boolean

Parameters

Name Type Description
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

Returns

Type Description
Boolean

GetNxtSubsidGLEntry

procedure GetNxtSubsidGLEntry(var GLEntry: Record "G/L Entry"): Boolean

Parameters

Name Type Description
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

Returns

Type Description
Boolean

Events

OnBeforeGenJnlPostLine

[IntegrationEvent(False,False)]
local procedure OnBeforeGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnBeforeInsertGLEntry

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertGLEntry(var SubsidGLEntry: Record "G/L Entry", GLEntry: Record "G/L Entry")

Parameters

Name Type Description
SubsidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnBeforeShowAnalysisViewEntryMessage

[IntegrationEvent(True,False)]
local procedure OnBeforeShowAnalysisViewEntryMessage(var AnalysisViewEntriesDeleted: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
AnalysisViewEntriesDeleted Boolean
IsHandled Boolean

OnClearPreviousConsolidationOnBeforeCheckAmountArray

[IntegrationEvent(False,False)]
local procedure OnClearPreviousConsolidationOnBeforeCheckAmountArray(var DeletedAmountsArray: array[500] of Decimal, var DeletedDatesArray: array[500] of Date)

Parameters

Name Type Description
DeletedAmountsArray array[500] of Decimal
DeletedDatesArray array[500] of Date

OnClearPreviousConsolidationOnBeforeUpdateAmountArray

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
ConsolidatedGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
DeletedAmountsArray array[500] of Decimal
DeletedDatesArray array[500] of Date
DeletedIdx Integer
IsHandled Boolean

OnUpdateGLEntryDimSetIDOnAfterAssignDimensionSetID

[IntegrationEvent(False,False)]
local procedure OnUpdateGLEntryDimSetIDOnAfterAssignDimensionSetID(var TempSubsidDimBuf: Record "Dimension Buffer" temporary)

Parameters

Name Type Description
TempSubsidDimBuf Table Microsoft.Finance.Dimension."Dimension Buffer"

OnBeforeUpdateTempGLEntry

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
TempSubsidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
CurErrorIdx Integer
ErrorText array[500] of Text
TestMode Boolean
WindowDialog Dialog

OnAfterUpdateTempGLEntry

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateTempGLEntry(var BusUnit: Record "Business Unit", var TempSubsidGLEntry: Record "G/L Entry")

Parameters

Name Type Description
BusUnit Table Microsoft.Finance.Consolidation."Business Unit"
TempSubsidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnAfterCreateAndPostGenJnlLine

[IntegrationEvent(False,False)]
local procedure OnAfterCreateAndPostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line", ConsolidAmount: Decimal, CurrencyACY: Code[10])

Parameters

Name Type Description
GenJournalLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
ConsolidAmount Decimal
CurrencyACY Code[10]

OnBeforeOnRun

[IntegrationEvent(True,False)]
local procedure OnBeforeOnRun(var BusinessUnit: Record "Business Unit")

Parameters

Name Type Description
BusinessUnit Table Microsoft.Finance.Consolidation."Business Unit"

OnBeforePostBalancingEntries

[IntegrationEvent(False,False)]
local procedure OnBeforePostBalancingEntries(var GenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnBeforeWindowUpdate

[IntegrationEvent(False,False)]
local procedure OnBeforeWindowUpdate(var GenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnAfterBusUnitModify

[IntegrationEvent(False,False)]
local procedure OnAfterBusUnitModify(var Rec: Record "Business Unit", var BusUnit: Record "Business Unit")

Parameters

Name Type Description
Rec Table Microsoft.Finance.Consolidation."Business Unit"
BusUnit Table Microsoft.Finance.Consolidation."Business Unit"

OnBeforeSetSelectedDim

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSelectedDim(var TempSelectedDim: Record "Selected Dimension", var SelectedDim: Record "Selected Dimension", var SkipAllDimensions: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
TempSelectedDim Table Microsoft.Finance.Dimension."Selected Dimension"
SelectedDim Table Microsoft.Finance.Dimension."Selected Dimension"
SkipAllDimensions Boolean
IsHandled Boolean

OnAfterGetGLAccount

[IntegrationEvent(False,False)]
local procedure OnAfterGetGLAccount(var TempSubsidGLAcc: Record "G/L Account")

Parameters

Name Type Description
TempSubsidGLAcc Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

OnBeforeClearPreviousConsolidation

[IntegrationEvent(False,False)]
local procedure OnBeforeClearPreviousConsolidation(var ConsolidGLEntry: Record "G/L Entry")

Parameters

Name Type Description
ConsolidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnBeforeUpdatePriorPeriodBalances

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePriorPeriodBalances(var GenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnBeforeConsolidGLEntryFindSet

[IntegrationEvent(False,False)]
local procedure OnBeforeConsolidGLEntryFindSet(var ConsolidGLEntry: Record "G/L Entry")

Parameters

Name Type Description
ConsolidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnBeforeConsolidGLAccFindSet

[IntegrationEvent(False,False)]
local procedure OnBeforeConsolidGLAccFindSet(var ConsolidGLAcc: Record "G/L Account")

Parameters

Name Type Description
ConsolidGLAcc Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

OnBeforeGenJnlPostLineTmp

[IntegrationEvent(False,False)]
local procedure OnBeforeGenJnlPostLineTmp(var GenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnBeforeTempDimSetEntryDelete

[IntegrationEvent(False,False)]
local procedure OnBeforeTempDimSetEntryDelete(var GenJnlLine: Record "Gen. Journal Line", var GLEntry: Record "G/L Entry")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnBeforeTempGenJnlLineInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeTempGenJnlLineInsert(var TempGenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
TempGenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnAfterCheckPostingDate

[IntegrationEvent(False,False)]
local procedure OnAfterCheckPostingDate(var GlEntry: Record "G/L Entry", var IsError: Boolean, var ErrorMsg: Text)

Parameters

Name Type Description
GlEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
IsError Boolean
ErrorMsg Text

OnBeforeUpdateTempGLEntryProcedure

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateTempGLEntryProcedure(var TempGLEntry: Record "G/L Entry", GLEntry: Record "G/L Entry", var IsHandled: Boolean, TempDimensionBufferIn: Record "Dimension Buffer")

Parameters

Name Type Description
TempGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
IsHandled Boolean
TempDimensionBufferIn Table Microsoft.Finance.Dimension."Dimension Buffer"

OnRunOnAfterCalcShouldClearPreviousConsolidation

[IntegrationEvent(True,False)]
local procedure OnRunOnAfterCalcShouldClearPreviousConsolidation(var ShouldClearPreviousConsolidation: Boolean)

Parameters

Name Type Description
ShouldClearPreviousConsolidation Boolean

OnRunOnBeforeTempGLEntryLoop

[IntegrationEvent(False,False)]
local procedure OnRunOnBeforeTempGLEntryLoop(var TempGLEntry: Record "G/L Entry", TempSubsidGLAcc: Record "G/L Account")

Parameters

Name Type Description
TempGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
TempSubsidGLAcc Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

OnRunOnBeforeWindowOpen

[IntegrationEvent(False,False)]
local procedure OnRunOnBeforeWindowOpen(var WindowDialog: Dialog, var IsHandled: Boolean)

Parameters

Name Type Description
WindowDialog Dialog
IsHandled Boolean

OnRunOnBeforeInsertTempDimBuf

[IntegrationEvent(False,False)]
local procedure OnRunOnBeforeInsertTempDimBuf(var TempDimensionBuffer: Record "Dimension Buffer", var TempSubsidDimensionBuffer: Record "Dimension Buffer")

Parameters

Name Type Description
TempDimensionBuffer Table Microsoft.Finance.Dimension."Dimension Buffer"
TempSubsidDimensionBuffer Table Microsoft.Finance.Dimension."Dimension Buffer"

OnCreateAndPostGenJnlLineOnBeforeConsolidGLAccGet

[IntegrationEvent(False,False)]
local procedure OnCreateAndPostGenJnlLineOnBeforeConsolidGLAccGet(var GenJournalLine: Record "Gen. Journal Line", var GLEntry: Record "G/L Entry", var BusinessUnit: Record "Business Unit", var TempSubsidGLAccount: Record "G/L Account")

Parameters

Name Type Description
GenJournalLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
GLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
BusinessUnit Table Microsoft.Finance.Consolidation."Business Unit"
TempSubsidGLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

OnRunOnBeforeLoopTempSubsidGLEntry

[IntegrationEvent(False,False)]
local procedure OnRunOnBeforeLoopTempSubsidGLEntry(var BusinessUnit: Record "Business Unit", var TempSubsidGLAccount: Record "G/L Account")

Parameters

Name Type Description
BusinessUnit Table Microsoft.Finance.Consolidation."Business Unit"
TempSubsidGLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

OnRunOnTempSubsidGLEntryLoopStart

[IntegrationEvent(False,False)]
local procedure OnRunOnTempSubsidGLEntryLoopStart(var GenJournalLine: Record "Gen. Journal Line", var BusinessUnit: Record "Business Unit", var TempSubsidGLEntry: Record "G/L Entry")

Parameters

Name Type Description
GenJournalLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
BusinessUnit Table Microsoft.Finance.Consolidation."Business Unit"
TempSubsidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnRunOnBeforeSetResidualAccount

[IntegrationEvent(False,False)]
local procedure OnRunOnBeforeSetResidualAccount(var BusinessUnit: Record "Business Unit", var GenJournalLine: Record "Gen. Journal Line", var IsHandled: Boolean)

Parameters

Name Type Description
BusinessUnit Table Microsoft.Finance.Consolidation."Business Unit"
GenJournalLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
IsHandled Boolean

OnBeforeExportToXML

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
FileName Text
TempSubsidGLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"
TempSubsidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
TempSubsidDimensionBuffer Table Microsoft.Finance.Dimension."Dimension Buffer"
TempSubsidCurrencyExchangeRate Table Microsoft.Finance.Currency."Currency Exchange Rate"
IsHandled Boolean

OnCheckAmountArrayOnBeforeReportError

[IntegrationEvent(False,False)]
local procedure OnCheckAmountArrayOnBeforeReportError(var DeletedAmountsArray: array[500] of Decimal, var DeletedDatesArray: array[500] of Date, DeletedIndex: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
DeletedAmountsArray array[500] of Decimal
DeletedDatesArray array[500] of Date
DeletedIndex Integer
IsHandled Boolean

OnBeforeImportFromXML

[IntegrationEvent(True,False)]
local procedure 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)

Parameters

Name Type Description
FileName Text
TempSubsidGLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"
TempSubsidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"
TempSubsidDimensionBuffer Table Microsoft.Finance.Dimension."Dimension Buffer"
TempSubsidCurrencyExchangeRate Table Microsoft.Finance.Currency."Currency Exchange Rate"
IsHandled Boolean

OnClearPreviousConsolidationOnAfterConsolidGLEntrySetFilters

[IntegrationEvent(False,False)]
local procedure OnClearPreviousConsolidationOnAfterConsolidGLEntrySetFilters(var ConsolidGLEntry: Record "G/L Entry")

Parameters

Name Type Description
ConsolidGLEntry Table Microsoft.Finance.GeneralLedger.Ledger."G/L Entry"

OnAfterSetGlobals

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
ProductVersion Code[10]
FormatVersion Code[10]
CompanyName Text[30]
CurrencyLCY Code[10]
CurrencyACY Code[10]
CurrencyPCY Code[10]
CheckSum Decimal
StartingDate Date
EndingDate Date

OnImportFromXMLOnBeforeSelectAllImportedDimensions

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
ProductVersion Code[10]
FormatVersion Code[10]
CompanyName Text[30]
CurrencyLCY Code[10]
CurrencyACY Code[10]
CurrencyPCY Code[10]
CheckSum Decimal
StartingDate Date
EndingDate Date

OnUpdatePriorPeriodBalancesOnBeforePostBalanceAdjustment

[IntegrationEvent(False,False)]
local procedure OnUpdatePriorPeriodBalancesOnBeforePostBalanceAdjustment(var GLAccount: Record "G/L Account")

Parameters

Name Type Description
GLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

OnTestGLAccountsOnBeforeTestForConflicts

[IntegrationEvent(True,False)]
local procedure OnTestGLAccountsOnBeforeTestForConflicts(var TempSubsidGLAcc: Record "G/L Account" temporary)

Parameters

Name Type Description
TempSubsidGLAcc Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

See also