---
id: object/codeunit/481
type: object
title: Codeunit 481 "Check Dimensions"
summary: Codeunit 481 "Check Dimensions" in Base Application (Microsoft.Finance.Dimension). 5 public procedures, 7 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 7cb8831a226f58ae946138c94f205ae4c79e89f3b27bccbd4cb27c73011446ef
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/Dimension/CheckDimensions.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/Dimension/CheckDimensions.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: 481
name: Check Dimensions
namespace: Microsoft.Finance.Dimension
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 27
  events: 7
  subscribers: 2
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 6
  called_by: 4
  implements: 0
---

# Codeunit 481 "Check Dimensions"

> Codeunit 481 "Check Dimensions" in Base Application (Microsoft.Finance.Dimension). 5 public procedures, 7 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC28.

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

## Events published

- `OnBeforeCheckPurchDim(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean)` (integration): Integration event raised before validating purchase document dimensions. Enables custom validation logic or skipping standard dimension validation.
- `OnBeforeCheckSalesDim(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean)` (integration): Integration event raised before validating sales document dimensions. Enables custom validation logic or skipping standard dimension validation.
- `OnBeforeShowContextDimensions(RecID: RecordID; var Result: Boolean; var IsHandled: Boolean)` (integration): Integration event raised before displaying context-specific dimension pages. Enables custom dimension page display logic based on record context.
- `OnCheckPurchDimLinesOnAfterCheckPurchDimValuePostingLine(var TempPurchLine: Record "Purchase Line")` (integration): Integration event raised after validating dimension value posting for purchase lines. Enables custom processing or additional validation after standard dimension checks.
- `OnCheckSalesDimLinesOnAfterCalcShouldCheckDimensions(SalesHeader: Record "Sales Header"; TempSalesLine: Record "Sales Line" temporary; var ShouldCheckDimensions: Boolean)` (integration): Integration event raised after determining whether sales dimensions should be checked. Enables custom logic to override dimension validation requirements based on document context.
- `OnCheckDimValuePostingOnAfterCreateDimTableIDs(RecordVariant: Variant; var TableIDArr: array[10] of Integer; var NumberArr: array[10] of Code[20])` (integration): Integration event raised after creating table ID and number arrays for dimension value posting validation. Enables custom table ID and number array population for extended dimension validation scenarios.
  - subscribers: [Codeunit 99000780 "Mfg. Dimension Management"](../codeunit/99000780.md) OnCheckDimValuePostingOnAfterCreateDimTableIDs
- `OnCheckPurchDimLinesOnBeforeCheckDim(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var CheckDimensions: Boolean)` (integration)

## Event subscriptions

- OnErrorMessageDrillDown subscribes to Table "Error Message" OnDrillDownSource
- OnOpenRelatedRecord subscribes to Page "Error Messages" OnOpenRelatedRecord

## Procedures

- `CheckPurchDim(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary)`: Validates dimension combinations and posting restrictions for purchase documents including header and lines. Performs comprehensive dimension validation using error collection mode for batch processing.
- `CheckPurchPrepmtDim(PurchaseHeader: Record "Purchase Header")`: Validates dimension combinations and posting restrictions for purchase prepayment scenarios. Performs header and prepayment line validation for purchase documents with prepayment percentages.
- `CheckSalesDim(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary)`: Validates dimension combinations and posting restrictions for sales documents including header and lines. Performs comprehensive dimension validation using error collection mode for batch processing.
- `CheckSalesPrepmtDim(SalesHeader: Record "Sales Header")`: Validates dimension combinations and posting restrictions for sales prepayment scenarios. Performs header and prepayment line validation for sales documents with prepayment percentages.
- `ShowContextDimensions(RecID: RecordID): Boolean`: Displays dimension-related pages based on the record type and context for dimension troubleshooting. Opens appropriate dimension pages for sales/purchase documents and their lines to aid in dimension validation errors.

Plus 13 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) (26 calls: `CheckPurchDim → SetCollectErrorsMode`, `CheckPurchDimCombHeader → CheckDimIDComb`, `CheckPurchDimCombHeader → GetDimErr`, …)
- [Codeunit 28 "Error Message Management"](../codeunit/28.md) (24 calls: `CheckPurchDimCombHeader → PopContext`, `CheckPurchDimCombHeader → PushContext`, `CheckPurchDimCombHeader → ThrowError`, …)
- [Codeunit 700 "Page Management"](../codeunit/700.md) (1 call: `OnOpenRelatedRecord → PageRun`)
- [Page 536 "Dimensions"](../page/536.md) (1 call: `ShowDimensionsSetup → (object)`)
- [Page 537 "Dimension Values"](../page/537.md) (1 call: `ShowDimensionsSetup → (object)`)
- [Page 540 "Default Dimensions"](../page/540.md) (1 call: `ShowDimensionsSetup → (object)`)

## Called by

- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (2 calls: `CheckAssosOrderLines → CheckPurchDim`, `CheckSalesDocument → CheckSalesDim`)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (2 calls: `CheckAssociatedOrderLines → CheckSalesDim`, `CheckPurchDocument → CheckPurchDim`)
- [Codeunit 442 "Sales-Post Prepayments"](../codeunit/442.md) (1 call: `CheckPrepmtDoc → CheckSalesPrepmtDim`)
- [Codeunit 444 "Purchase-Post Prepayments"](../codeunit/444.md) (1 call: `CheckPrepmtDoc → CheckPurchPrepmtDim`)

## Across versions

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

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: "Check Dimensions")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
