Saturday, February 16, 2013

Create a New Financial Dimension

AX 2012 supports unlimited number of Financial Dimensions. System entities like Projects, Customers, Customer groups etc can be made into Dimensions. Form opens at General ledger > Setup > Financial dimensions > Financial dimensions. One option is to create a user-defined financial dimension in the Use values from field by selecting < Custom dimension >. Another way it to customize AX to include your own dimensions.
For example, one requirement i got was to have Mode of Delivery as a Financial dimension.

So what needs to be done?

Luckily, only thing required is to create a view.

1. Create a view named DimAttributeModeOfDelivery. Why such a name, little later.
2. Define its datasource name as BackingEntity.
3. Define three fields on it namely, Key(RecId), Value(Code like Id) and Name

Whats going on here?
Form DimensionDetails's run method calls Class method which calls a method DimensionEnabledType::getSystemDefinedDimensions()

Next call is made to DimensionEnabledType::getSystemDefinedDimensionsServer()

Here the code loops through and if an entity is a view and matches proper naming conventions (prefix DimAttribute*), considers it "dimension enabled"

No comments:

Post a Comment