This post is machine-translated. The original post in german language can be found here.

AX 2012: Enter financial dimension based on an form input

Sometimes you have the requirement that a certain financial dimension is to be set on the basis of an input in a form.

The following code example is something relatively easy to implement. In the example, whenever a particular field is changed - queried on the method modified() of the field of a DataSource, the financial dimension Costcenter will be filled with the value 25. If the value to be entered an invalid, nothing happens (error message or similar).

public void modified()
    DimensionAttribute DimensionAttribute = DimensionAttribute::findByName("Costcenter");
    DimensionValue newValue = '25';    // New dimension value
        DimensionAttributeValue::findByDimensionAttributeAndValue(DimensionAttribute, newValue).RecId, 

In the example, an existing instance of DimensionDefaultingController used.

These post applies to following version:
Dynamics AX 2012

Add comment


This post is part of the series »Dynamics AX 2012 - Financial dimensions«

In Dynamics AX 2012, the handling of financial dimensions has changed. Both on the surface and the underlying data model.

In earlier versions you find one field - usually named dimension - of type array. Now you'll find a field derived from RecId called DefaultDimension (or similar).

In this series I want to specifically address these changes and present one or the other piece of code.

Show all posts from this series

RSS-Feed of this blog series


Posts of the actual month
November 2023
© 2006-2023 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.