Codeunit 481 "Check Dimensions"
Base Application · Microsoft.Finance.Dimension
Across versions
- BC23-27present
- BC281 events added
- BC29-30unchanged
Neighbourhood 11 connected objects and pages
Base Application · Microsoft.Finance.Dimension · BC23-30 · source at ea08af5e · 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” OnCheckDimValuePostingOnAfterCreateDimTableIDs
OnCheckPurchDimLinesOnBeforeCheckDim(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var CheckDimensions: Boolean)+ BC28 (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” (26 calls:
CheckPurchDim → SetCollectErrorsMode,CheckPurchDimCombHeader → CheckDimIDComb,CheckPurchDimCombHeader → GetDimErr, …) - Codeunit 28 “Error Message Management” (24 calls:
CheckPurchDimCombHeader → PopContext,CheckPurchDimCombHeader → PushContext,CheckPurchDimCombHeader → ThrowError, …) - Codeunit 700 “Page Management” (1 call:
OnOpenRelatedRecord → PageRun) - Page 536 “Dimensions” (1 call:
ShowDimensionsSetup → (object)) - Page 537 “Dimension Values” (1 call:
ShowDimensionsSetup → (object)) - Page 540 “Default Dimensions” (1 call:
ShowDimensionsSetup → (object))
Called by
- Codeunit 80 “Sales-Post” (2 calls:
CheckAssosOrderLines → CheckPurchDim,CheckSalesDocument → CheckSalesDim) - Codeunit 90 “Purch.-Post” (2 calls:
CheckAssociatedOrderLines → CheckSalesDim,CheckPurchDocument → CheckPurchDim) - Codeunit 442 “Sales-Post Prepayments” (1 call:
CheckPrepmtDoc → CheckSalesPrepmtDim) - Codeunit 444 “Purchase-Post Prepayments” (1 call:
CheckPrepmtDoc → CheckPurchPrepmtDim)
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.