---
id: object/codeunit/2580
type: object
title: Codeunit 2580 "Dimension Correction Mgt"
summary: Codeunit 2580 "Dimension Correction Mgt" in Base Application (Microsoft.Finance.Dimension.Correction). 49 public procedures, 5 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "26"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 313f06dc0032ebc787dca7e3b3d498b48f5ab6b7aaf62b57ae68b6267514b870
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/Dimension/Correction/DimensionCorrectionMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/Dimension/Correction/DimensionCorrectionMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 2580
name: Dimension Correction Mgt
namespace: Microsoft.Finance.Dimension.Correction
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 69
  events: 5
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 10
  implements: 0
---

# Codeunit 2580 "Dimension Correction Mgt"

> Codeunit 2580 "Dimension Correction Mgt" in Base Application (Microsoft.Finance.Dimension.Correction). 49 public procedures, 5 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC26.

Base Application · Microsoft.Finance.Dimension.Correction · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/Dimension/Correction/DimensionCorrectionMgt.Codeunit.al) · facts from BC29

## Events published

- `OnGetPreviewGLEntriesLimit(var Handled: Boolean; var Limit: Integer)` (integration): Integration event allowing customization of preview G/L entries limit.
- `OnGetCommitCount(var Handled: Boolean; var CommitCount: Integer)` (integration): Integration event allowing customization of commit count threshold.
- `OnGetFilterCount(var Handled: Boolean; var FilterCount: Integer)` (integration): Integration event allowing customization of filter conditions limit.
- `OnAfterVerifyIfDimensionCanBeChanged(var DimCorrectionChange: Record "Dim Correction Change")` (integration): Integration event raised after verifying if dimension can be changed.
- `OnTransformDimensionSetOnBeforeInsertTempNewDimensionSetEntry(var TempNewDimensionSetEntry: Record "Dimension Set Entry" temporary)` (integration): Integration event raised before inserting temporary new dimension set entry during dimension transformation.

## Event subscriptions

- HandleJobQueueFailures subscribes to Table "Job Queue Entry" OnAfterFinalizeRun

## Procedures

- `ValidateNoBlockedDimensionsUsed(var DimensionCorrection: Record "Dimension Correction")`: Validates that no blocked dimensions are used in the dimension correction changes. Checks all changes to ensure dimensions and dimension values are not blocked for use.
- `GenerateSupportingTables(var DimensionCorrection: Record "Dimension Correction"; var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary)`: Generates supporting tables and data structures for dimension correction processing. Creates target dimension set IDs and prepares temporary buffers for validation and execution.
- `VerifyCanValidateDimensionCorrection(var DimensionCorrection: Record "Dimension Correction")`: Verifies that the dimension correction can be validated based on its current status. Checks if the dimension correction is in a valid state for validation processing.
- `ValidateBlockedNotUsed(var DimensionCorrection: Record "Dimension Correction")`: Validates that blocked dimensions and dimension values are not used in the correction. Performs validation with telemetry logging to ensure data integrity.
- `ValidateDimensionSets(var DimensionCorrection: Record "Dimension Correction"; var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary; var ErrorCount: Integer)`: Validates dimension sets for the correction to ensure dimension combination rules are followed. Checks dimension combinations and restrictions, counting any validation errors encountered.
- `ValidateDimensionChanges(var DimensionCorrection: Record "Dimension Correction"; var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary; var ErrorCount: Integer)`: Validates dimension changes across all selected entries for a dimension correction.
- `VerifyIfDimensionCanBeChanged(var DimCorrectionChange: Record "Dim Correction Change")`: Verifies whether a specific dimension can be changed based on blocking setup.
- `DeleteValidationErrors(var DimensionCorrection: Record "Dimension Correction")`: Deletes all validation error messages associated with a dimension correction.
- `UpdateValidationStatusAndThrowErrorIfFailed(var DimensionCorrection: Record "Dimension Correction"; ErrorCount: Integer)`: Updates validation status and throws an error if validation failed.
- `GenerateSelectedEntries(var DimensionCorrection: Record "Dimension Correction"; var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary)`: Generates selected entries for dimension correction based on selection criteria.
- `IsGLEntryForUpdate(var GLEntry: Record "G/L Entry"; var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary; DimensionCorrectionEntryNo: Integer; var TempExcludedEntriesInteger: Record Integer temporary): boolean`: Determines if a G/L entry should be updated during dimension correction.
- `GetTargetDimCorrectionSetBuffer(var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary; var DimensionCorrection: Record "Dimension Correction"; var GLEntry: Record "G/L Entry"): Boolean`: Retrieves the target dimension correction set buffer for a specific G/L entry.
- `GenerateTargetDimensionSetIds(var DimensionCorrection: Record "Dimension Correction")`: Generates target dimension set IDs for dimension correction based on correction changes.
- `CreateCorrectionFromGLRegister(var GLRegister: Record "G/L Register"; var DimensionCorrection: Record "Dimension Correction")`: Creates a dimension correction from selected G/L register entries.
- `CreateCorrectionFromSelection(var GLEntry: Record "G/L Entry"; var DimensionCorrection: Record "Dimension Correction")`: Creates a dimension correction from manually selected G/L entries.
- `CreateCorrectionFromFilter(var GLEntry: Record "G/L Entry"; var DimensionCorrection: Record "Dimension Correction")`: Creates a dimension correction from G/L entries based on filter criteria.
- `InsertNewDimCorrectSelectionCriteria(var MainRecordRef: RecordRef; DimCorrectSelectionCriteriaFilterType: Option; var DimCorrectSelectionCriteria: Record "Dim Correct Selection Criteria"; DimensionCorrectionEntryNo: Integer)`: Inserts new dimension correction selection criteria based on record filters.
- `GetSelectedDimensionSetIDsFilter(var TempDimensionSetEntry: Record "Dimension Set Entry" temporary): Text`: Generates a filter text for selected dimension set IDs from temporary dimension set entries.
- `GetSelectedDimensionSetIDs(var TempDimensionSetEntry: Record "Dimension Set Entry" temporary; var TempFoundDimensionSetIDInteger: Record "Integer" temporary)`: Retrieves selected dimension set IDs based on temporary dimension set entries.
- `TransferSelectionFilterToRecordRef(var GLEntry: Record "G/L Entry"; var GLEntryRecordRef: RecordRef)`: Transfers selection filter from G/L Entry record to a record reference for filter processing.
- `GetDimCorrectionChanges(DimensionCorrectionEntryNo: Integer; var TempDimCorrectionChange: Record "Dim Correction Change" temporary): Boolean`: Retrieves dimension correction changes for a specific dimension correction entry.
- `GetSelectionCriteria(DimensionCorrectionEntryNo: Integer; var DimCorrectSelectionCriteria: Record "Dim Correct Selection Criteria"): Boolean`: Retrieves selection criteria for a dimension correction entry.
- `CalculateDimensionSetIds(var DimensionSetIds: List of [Integer]; var DimCorrectSelectionCriteria: Record "Dim Correct Selection Criteria")`: Calculates dimension set IDs based on selection criteria filters.
- `ReloadDimensionChangesTable(DimCorrectionEntryNo: Integer)`: Reloads dimension changes table by recalculating changes based on current selection criteria.
- `LoadTempDimCorrectionSetBuffer(DimensionCorrectionEntryNo: Integer; var TempDimCorrectionSetBuffer: Record "Dim Correction Set Buffer" temporary): Boolean`: Loads dimension correction set buffer data into a temporary record.
- `ScheduleRunJob(var DimensionCorrection: Record "Dimension Correction"): Boolean`: Schedules a job queue entry to run dimension correction.
- `ScheduleUndoJob(var DimensionCorrection: Record "Dimension Correction"): Boolean`: Schedules a job queue entry to undo dimension correction.
- `ScheduleValidationJob(var DimensionCorrection: Record "Dimension Correction"): Boolean`: Schedules a job queue entry to validate dimension correction.
- `ScheduleUpdateAnalysisViews(var DimensionCorrection: Record "Dimension Correction"): Boolean`: Schedules a job queue entry to update analysis views after dimension correction.
- `UpdateStatus(var DimensionCorrection: Record "Dimension Correction")`: Updates the status of a dimension correction based on job queue entry status.
- `UpdateAnalysisViewStatus(var DimensionCorrection: Record "Dimension Correction")`: Updates the analysis view status for dimension correction based on job queue entry status.
- `VerifyCanStartJob(DimensionCorrection: Record "Dimension Correction")`: Verifies that a dimension correction job can be started by checking for conflicts with other running jobs.
- `SetStatusInProgress(var DimensionCorrection: Record "Dimension Correction")`: Sets dimension correction status to in progress and clears error information.
- `SetUndoStatusInProgress(var DimensionCorrection: Record "Dimension Correction")`: Sets dimension correction status to undo in progress and clears error information.
- `SetValidatingStatusInProgress(var DimensionCorrection: Record "Dimension Correction")`: Sets dimension correction status to validation in progress and clears validation fields.
- `GetValidationStatusText(var DimensionCorrection: Record "Dimension Correction"; ErrorMessage: Text): Text`: Gets formatted validation status text for dimension correction.
- `CopyToDraft(var DimensionCorrection: Record "Dimension Correction"; var NewDimensionCorrection: Record "Dimension Correction")`: Creates a draft copy of an existing dimension correction with all selection criteria.
- `IsEntryExclued(var GLEntry: Record "G/L Entry"; DimensionCorrectionEntryNo: Integer): Boolean`: Determines if a G/L entry is excluded from dimension correction based on exclusion criteria.
- `IsEntryExclued(var GLEntry: Record "G/L Entry"; var ExcludedDimCorrectSelectionCriteria: Record "Dim Correct Selection Criteria"): Boolean`: Determines if a G/L entry is excluded based on specific exclusion selection criteria.
- `IncrementAndCommitIfNeeded(var Counter: Integer)`: Increments a counter and commits database changes if the commit threshold is reached.
- `GetMaximumNumberOfValidationErrors(): Integer`: Gets the maximum number of validation errors allowed before stopping validation.
- `GetCommitCount(): Integer`: Gets the number of operations after which database changes should be committed.
- `GetPreviewGLEntriesLimit(): Integer`: Gets the maximum number of G/L entries to show in preview mode.
- `GetFilterConditionsLimit(): Integer`: Gets the maximum number of filter conditions allowed in selection criteria.
- `SetUpdateAnalysisViewsCompleted(var DimensionCorrection: Record "Dimension Correction")`: Sets the analysis views update status to completed and clears error messages.
- `ShowNotificationUpdateCashFlowAccounting()`: Shows notification to update cost accounting manually after dimension correction.
- `DontShowAgainUpdateCostAccounting(UpdateCostAcountingNotification: Notification)`: Disables the cost accounting update notification to prevent future display.
- `VerifyCanUndoDimensionCorrection(var DimensionCorrection: Record "Dimension Correction")`: Verifies that a dimension correction can be undone by checking if dimension sets are still valid.
- `VerifyCanModifyDraftEntry(DimensionCorrectionEntryNo: Integer)`: Verifies that a draft dimension correction entry can be modified based on its current status.

Plus 14 local procedures.

## Triggers

OnRun

## 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 408 "DimensionManagement"](../codeunit/408.md) (4 calls: `TransformDimensionSet → GetDimensionSet`, `TransformDimensionSet → GetDimensionSetID`, `ValidateDimensionSets → CheckDimIDComb`, …)
- [Codeunit 28 "Error Message Management"](../codeunit/28.md) (1 call: `ValidateDimensionSets → GetLastError`)
- [Codeunit 46 "SelectionFilterManagement"](../codeunit/46.md) (1 call: `TransferSelectionFilterToRecordRef → GetSelectionFilter`)

## Called by

- [Codeunit 2583 "Dim Correction Validate"](../codeunit/2583.md) (14 calls: `ValidateDraftCorrection → GenerateSupportingTables`, `ValidateDraftCorrection → SetValidatingStatusInProgress`, `ValidateDraftCorrection → UpdateValidationStatusAndThrowErrorIfFailed`, …)
- [Codeunit 2581 "Dim Correction Run"](../codeunit/2581.md) (6 calls: `RunDimensionCorrection → GenerateSupportingTables`, `RunDimensionCorrection → ScheduleUpdateAnalysisViews`, `RunDimensionCorrection → SetStatusInProgress`, …)
- [Codeunit 2582 "Dimension Correction Undo"](../codeunit/2582.md) (6 calls: `RunUndoDimensionCorrection → ScheduleUpdateAnalysisViews`, `RunUndoDimensionCorrection → SetUndoStatusInProgress`, `RunUndoDimensionCorrection → VerifyCanUndoDimensionCorrection`, …)
- [Page 2583 "Dim. Correct Ledger Entries"](../page/2583.md) (3 calls: `LoadRecordsForSelection → GetPreviewGLEntriesLimit`, `UpdateRecordCount → GetPreviewGLEntriesLimit`, `VerifyCanChangePart → VerifyCanModifyDraftEntry`)
- [Page 2588 "Dimension Correction"](../page/2588.md) (3 calls: `OnAfterGetCurrRecord → ShowNotificationUpdateCashFlowAccounting`, `OnAfterGetRecord → UpdateAnalysisViewStatus`, `OnAfterGetRecord → UpdateStatus`)
- [Page 2584 "Dim Correct Posted Ledg Entr"](../page/2584.md) (2 calls: `LoadRecords → GetFilterConditionsLimit`, `LoadRecords → GetPreviewGLEntriesLimit`)
- [Codeunit 2584 "Dim Corr Analysis View"](../codeunit/2584.md) (1 call: `ShouldUpdateAnalysisView → GetDimCorrectionChanges`)
- [Page 2590 "Dimension Correction Changes"](../page/2590.md) (1 call: `VerifyCanChangePart → VerifyCanModifyDraftEntry`)
- [Page 2591 "Dimension Correction Draft"](../page/2591.md) (1 call: `OnAfterGetRecord → UpdateStatus`)
- [Table 2582 "Dimension Correction"](../table/2582.md) (1 call: `ReopenDraftDimensionCorrection → DeleteValidationErrors`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). 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: "Dimension Correction Mgt")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
