---
id: post/gerardorenteria-blog/15143
type: post
title: 🧩 Deriving dimensions in Business Central beyond Default Dimensions
summary: "The OnAfterGetRecDefaultDimIDProcedure integration event in the DimensionManagement codeunit fires after Business Central calculates default dimensions, allowing you to extend or modify dimension sets with custom logic. This approach demonstrates five scenarios: deriving dimensions from document fields, other dimensions, related tables, historical data, and overriding with higher-priority rules."
tier: community
language: es
tags:
  - dimensions
  - integration events
  - sales documents
  - al development
  - dimension set management
  - custom logic
  - event subscribers
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-07T23:47:50.060Z"
  flags: []
generated:
  at: "2026-10-07T22:42:12.892Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 6ce4d5648a2f10eb313a7135a3f0353a90f1cde2c1cf2bf9fa52ddf98dcddda9
evidence:
  - kind: blog
    url: https://gerardorenteria.blog/2026/08/09/%f0%9f%a7%a9-deriving-dimensions-in-business-central-beyond-default-dimensions/
    title: 🧩 Deriving dimensions in Business Central beyond Default Dimensions
    date: "2026-08-09"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://gerardorenteria.blog/2026/08/09/%f0%9f%a7%a9-deriving-dimensions-in-business-central-beyond-default-dimensions/
    title: 🧩 Deriving dimensions in Business Central beyond Default Dimensions
    date: "2026-08-09"
    commit: null
    t: null
    quote: "La idea es sencilla: primero preparas en memoria lo que quieres cambiar, luego lo aplicas de golpe sobre el set real."
links:
  learn: []
  objects:
    - object/codeunit/408
    - object/table/36
    - object/table/13
    - object/table/112
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "15143"
source_id: gerardorenteria-blog
source_name: Gerardo Renteria
url: https://gerardorenteria.blog/2026/08/09/%f0%9f%a7%a9-deriving-dimensions-in-business-central-beyond-default-dimensions/
published_at: "2026-08-09T15:01:49.000Z"
author: Gerardo Renteria
full_text: false
words: 2869
quotes:
  - text: "La idea es sencilla: primero preparas en memoria lo que quieres cambiar, luego lo aplicas de golpe sobre el set real."
    why_it_matters: Describes the two-step pattern (StageDim then CommitStagedDims) that avoids repeating logic across scenarios
code_objects_mentioned:
  - codeunit DimensionManagement
  - codeunit GDRGCustomerDimSubs
  - codeunit GDRGDerivedDimMgt
  - table Sales Header
  - table Dimension Set Entry
  - table Salesperson/Purchaser
  - table Sales Invoice Header
systems:
  - sales
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://gerardorenteria.blog/2026/08/09/%f0%9f%a7%a9-deriving-dimensions-in-business-central-beyond-default-dimensions/embed/
  image: https://i0.wp.com/gerardorenteria.blog/wp-content/uploads/2026/08/designer.png?fit=1200%2C1200&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 1200
  site_name: Gerardo Rentería Blog
  favicon: https://gerardorenteria.blog/wp-content/uploads/2020/11/cropped-wolficon.jpg?w=32
  probed_at: "2026-10-07T11:50:17.055Z"
---

# 🧩 Deriving dimensions in Business Central beyond Default Dimensions

[Read the post](https://gerardorenteria.blog/2026/08/09/%f0%9f%a7%a9-deriving-dimensions-in-business-central-beyond-default-dimensions/) · Gerardo Renteria (Gerardo Renteria) · 2026-08-09 · 2869 words · tier community · reviewed (checked by Opus)

> The OnAfterGetRecDefaultDimIDProcedure integration event in the DimensionManagement codeunit fires after Business Central calculates default dimensions, allowing you to extend or modify dimension sets with custom logic. This approach demonstrates five scenarios: deriving dimensions from document fields, other dimensions, related tables, historical data, and overriding with higher-priority rules.

## Key points

- Hook into OnAfterGetRecDefaultDimIDProcedure to extend default dimensions without modifying standard code
- Use two helper procedures: StageDim to prepare dimensions in a temporary buffer and CommitStagedDims to merge them into the document's dimension set
- Derive dimensions from multiple sources: document fields, already-calculated dimensions, related table lookups, and historical customer data
- Force dimension recalculation by subscribing to field OnAfterValidateEvent when Business Central doesn't automatically recalculate
- Override previously derived dimensions with higher-priority rules in the same event to implement conditional logic

## Quotes

- "La idea es sencilla: primero preparas en memoria lo que quieres cambiar, luego lo aplicas de golpe sobre el set real." (Describes the two-step pattern (StageDim then CommitStagedDims) that avoids repeating logic across scenarios)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 408 "DimensionManagement"](../../objects/codeunit/408.md)
- codeunit "GDRGCustomerDimSubs"
- codeunit "GDRGDerivedDimMgt"
- [table 36 "Sales Header"](../../objects/table/36.md)
- table "Dimension Set Entry"
- [table 13 "Salesperson/Purchaser"](../../objects/table/13.md)
- [table 112 "Sales Invoice Header"](../../objects/table/112.md)

Not found in BC28-30: codeunit "GDRGCustomerDimSubs", codeunit "GDRGDerivedDimMgt".

More than one object has this name, so none is linked: table "Dimension Set Entry".

## Context

- Features: dimension derivation, integration events, default dimensions, dimension set modification, custom dimension logic, dimension recalculation triggering, dimension override rules

Source: Gerardo Renteria, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
