Table of Contents

Table Dimension

ID 348
Namespace: Microsoft.Finance.Dimension

Table Dimension (ID 348). Stores the master data for dimensions used for financial analysis. Dimensions provide a way to analyze business transactions across different business criteria.

Properties

Name Value
Caption Dimension
DataCaptionFields 1,2
DrillDownPageID Page Microsoft.Finance.Dimension."Dimension List"
LookupPageID Page Microsoft.Finance.Dimension."Dimension List"
DataClassification CustomerContent

Fields

Name Type Description
Code Code[20]

The unique code that identifies the dimension. This field cannot be blank and cannot use reserved system names.

Name Text[30]

The descriptive name of the dimension that appears in the user interface. This name should clearly describe what the dimension represents.

"Code Caption" Text[80]

The caption used for dimension code fields in forms and reports. If not specified, defaults to the dimension code with proper formatting.

"Filter Caption" Text[80]

The caption used for dimension filter fields in forms and reports. If not specified, defaults to "Filter" appended to the dimension code.

Description Text[100]

Extended description of the dimension providing additional context about its purpose and usage.

Blocked Boolean

Indicates whether the dimension is blocked from being used in new transactions. Blocked dimensions cannot be selected in new documents but existing data remains unchanged.

"Consolidation Code" Code[20]

The consolidation code used when consolidating financial data across business units. Links this dimension to corresponding dimensions in subsidiary companies.

"Map-to IC Dimension Code" Code[20]

Maps this dimension to an intercompany dimension for transactions between related companies. When set, all dimension values are automatically mapped to the corresponding IC dimension.

"Last Modified Date Time" DateTime

System field that tracks when the dimension record was last modified. Used for synchronization and audit purposes.

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemCreatedByUserName Text[50]
SystemCreatedByFullName Text[80]
SystemModifiedByUserName Text[50]
SystemModifiedByFullName Text[80]
SystemRowVersion BigInteger

Methods

CheckIfDimUsed

Checks if a dimension is being used in various system setups, posted entries, or budgets. This comprehensive check prevents deletion of dimensions that would cause data integrity issues.

procedure CheckIfDimUsed(DimChecked: Code[20]; DimTypeChecked: Enum "Dim Type Checked"; BudgetNameChecked: Code[10]; AnalysisViewChecked: Code[10]; AnalysisAreaChecked: Integer): Boolean

Parameters

Name Type Description
DimChecked Code[20]

The dimension code to check for usage.

DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"

The specific dimension type context to check (Global, Shortcut, Budget, etc.).

BudgetNameChecked Code[10]

The budget name to check if budget-specific validation is needed.

AnalysisViewChecked Code[10]

The analysis view to check if analysis-specific validation is needed.

AnalysisAreaChecked Integer

The analysis area (Sales/Purchase) for item-related checks.

Returns

Type Description
Boolean

True if the dimension is used and cannot be deleted; false otherwise.

GetCheckDimErr

Returns the formatted error message indicating where the dimension is being used. Used in conjunction with CheckIfDimUsed to provide detailed error information.

procedure GetCheckDimErr(): Text[250]

Returns

Type Description
Text[250]

The formatted error message detailing dimension usage.

GetMLName

Retrieves the multilanguage name for the dimension in the specified language. Falls back to the default name if no translation exists.

procedure GetMLName(LanguageID: Integer): Text[30]

Parameters

Name Type Description
LanguageID Integer

The language ID for the requested translation.

Returns

Type Description
Text[30]

The dimension name in the specified language.

GetMLCodeCaption

Retrieves the multilanguage code caption for the dimension in the specified language. Falls back to the default code caption if no translation exists.

procedure GetMLCodeCaption(LanguageID: Integer): Text[80]

Parameters

Name Type Description
LanguageID Integer

The language ID for the requested translation.

Returns

Type Description
Text[80]

The dimension code caption in the specified language.

GetMLFilterCaption

Retrieves the multilanguage filter caption for the dimension in the specified language. Falls back to the default filter caption if no translation exists.

procedure GetMLFilterCaption(LanguageID: Integer): Text[80]

Parameters

Name Type Description
LanguageID Integer

The language ID for the requested translation.

Returns

Type Description
Text[80]

The dimension filter caption in the specified language.

SetMLName

Sets the multilanguage name for the dimension in the specified language. Updates either the main record or creates/updates a translation record.

procedure SetMLName(NewMLName: Text[30]; LanguageID: Integer)

Parameters

Name Type Description
NewMLName Text[30]

The new name to set for the dimension.

LanguageID Integer

The language ID for the translation.

SetMLCodeCaption

Sets the multilanguage code caption for the dimension in the specified language. Updates either the main record or creates/updates a translation record.

procedure SetMLCodeCaption(NewMLCodeCaption: Text[80]; LanguageID: Integer)

Parameters

Name Type Description
NewMLCodeCaption Text[80]

The new code caption to set for the dimension.

LanguageID Integer

The language ID for the translation.

SetMLFilterCaption

Sets the multilanguage filter caption for the dimension in the specified language. Updates either the main record or creates/updates a translation record.

procedure SetMLFilterCaption(NewMLFilterCaption: Text[80]; LanguageID: Integer)

Parameters

Name Type Description
NewMLFilterCaption Text[80]

The new filter caption to set for the dimension.

LanguageID Integer

The language ID for the translation.

SetMLDescription

Sets the multilanguage description for the dimension in the specified language. Currently only creates the translation record structure without storing the description value.

procedure SetMLDescription(NewMLDescription: Text[100]; LanguageID: Integer)

Parameters

Name Type Description
NewMLDescription Text[100]

The new description to set for the dimension.

LanguageID Integer

The language ID for the translation.

Events

OnAfterDeleteRelatedRecords

Integration event raised after deleting records related to a dimension being deleted. Enables cleanup of custom dimension-related data when a dimension is removed.

[IntegrationEvent(False,False)]
local procedure OnAfterDeleteRelatedRecords(DimensionCode: Code[20])

Parameters

Name Type Description
DimensionCode Code[20]

Code of the dimension that was deleted

OnBeforeDeleteRelatedRecords

Integration event raised before deleting records related to a dimension being deleted. Enables validation or preparation before dimension-related data cleanup occurs.

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteRelatedRecords(DimensionCode: Code[20])

Parameters

Name Type Description
DimensionCode Code[20]

Code of the dimension being deleted

OnBeforeCheckIfDimUsed

Integration event raised before checking if a dimension is used in custom scenarios. Enables custom validation of dimension usage beyond standard Business Central checks.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckIfDimUsed(DimChecked: Code[20]; DimTypeChecked: Enum "Dim Type Checked"; var UsedAsCustomDim: Boolean; var CustomDimErr: Text; AnalysisViewChecked: Code[10]; AnalysisAreaChecked: Integer)

Parameters

Name Type Description
DimChecked Code[20]

Dimension code being checked for usage

DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"

Type of dimension being checked (Global, Shortcut, Budget, Analysis, etc.)

UsedAsCustomDim Boolean

Set to true if dimension is used in custom scenarios

CustomDimErr Text

Error message to display if dimension is used

AnalysisViewChecked Code[10]

Analysis view code being checked

AnalysisAreaChecked Integer

Analysis area being checked

OnBeforeCheckIfDimUsedAsAnalysisViewDim

Integration event raised before checking if a dimension is used as an analysis view dimension. Enables custom logic for determining dimension usage in analysis views and related scenarios.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckIfDimUsedAsAnalysisViewDim(AnalysisView: Record "Analysis View"; DimChecked: Code[20]; DimTypeChecked: Enum "Dim Type Checked"; CheckAllDim: Boolean; CheckAnalysisViewDim: Boolean; AnalysisViewChecked: Code[10]; var UsedAsAnalysisViewDim: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
AnalysisView Table Microsoft.Finance.Analysis."Analysis View"

Analysis view record being checked

DimChecked Code[20]

Dimension code being checked

DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"

Type of dimension being checked

CheckAllDim Boolean

Whether to check all dimensions

CheckAnalysisViewDim Boolean

Whether to check analysis view dimensions

AnalysisViewChecked Code[10]

Analysis view code being checked

UsedAsAnalysisViewDim Boolean

Set to true if dimension is used as analysis view dimension

IsHandled Boolean

Set to true to skip standard analysis view dimension checking

OnBeforeCheckAllDimensions

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckAllDimensions(var DimTypeChecked: Enum "Dim Type Checked"; var CheckAllDim: Boolean; var CheckGlobalDim: Boolean; var CheckShortcutDim: Boolean; var CheckBudgetDim: Boolean; var CheckAnalysisViewDim: Boolean; var CheckItemBudgetDim: Boolean; var CheckItemAnalysisViewDim: Boolean; var UsedAsCustomDim: Boolean; var CustomDimErr: Text; var IsHandled: Boolean)

Parameters

Name Type Description
DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"
CheckAllDim Boolean
CheckGlobalDim Boolean
CheckShortcutDim Boolean
CheckBudgetDim Boolean
CheckAnalysisViewDim Boolean
CheckItemBudgetDim Boolean
CheckItemAnalysisViewDim Boolean
UsedAsCustomDim Boolean
CustomDimErr Text
IsHandled Boolean

OnAfterCheckAllDimensions

[IntegrationEvent(False,False)]
local procedure OnAfterCheckAllDimensions(var DimTypeChecked: Enum "Dim Type Checked"; var CheckAllDim: Boolean; var CheckGlobalDim: Boolean; var CheckShortcutDim: Boolean; var CheckBudgetDim: Boolean; var CheckAnalysisViewDim: Boolean; var CheckItemBudgetDim: Boolean; var CheckItemAnalysisViewDim: Boolean; var UsedAsCustomDim: Boolean; var CustomDimErr: Text)

Parameters

Name Type Description
DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"
CheckAllDim Boolean
CheckGlobalDim Boolean
CheckShortcutDim Boolean
CheckBudgetDim Boolean
CheckAnalysisViewDim Boolean
CheckItemBudgetDim Boolean
CheckItemAnalysisViewDim Boolean
UsedAsCustomDim Boolean
CustomDimErr Text

OnBeforeCheckIfDimUsedAsItemAnalysisViewDim

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckIfDimUsedAsItemAnalysisViewDim(var ItemAnalysisView: Record "Item Analysis View"; var DimChecked: Code[20]; var DimTypeChecked: Enum "Dim Type Checked"; var AnalysisViewChecked: Code[10]; var AnalysisAreaChecked: Integer; var CheckAllDim: Boolean; var CheckItemAnalysisViewDim: Boolean; var UsedAsItemAnalysisViewDim: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
ItemAnalysisView Table Microsoft.Inventory.Analysis."Item Analysis View"
DimChecked Code[20]
DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"
AnalysisViewChecked Code[10]
AnalysisAreaChecked Integer
CheckAllDim Boolean
CheckItemAnalysisViewDim Boolean
UsedAsItemAnalysisViewDim Boolean
IsHandled Boolean

OnAfterCheckIfDimUsedAsItemAnalysisViewDim

[IntegrationEvent(False,False)]
local procedure OnAfterCheckIfDimUsedAsItemAnalysisViewDim(var ItemAnalysisView: Record "Item Analysis View"; var DimChecked: Code[20]; var DimTypeChecked: Enum "Dim Type Checked"; var AnalysisViewChecked: Code[10]; var AnalysisAreaChecked: Integer; var CheckAllDim: Boolean; var CheckItemAnalysisViewDim: Boolean; var UsedAsItemAnalysisViewDim: Boolean)

Parameters

Name Type Description
ItemAnalysisView Table Microsoft.Inventory.Analysis."Item Analysis View"
DimChecked Code[20]
DimTypeChecked Enum Microsoft.Finance.Dimension."Dim Type Checked"
AnalysisViewChecked Code[10]
AnalysisAreaChecked Integer
CheckAllDim Boolean
CheckItemAnalysisViewDim Boolean
UsedAsItemAnalysisViewDim Boolean

See also