Skip to main content



No record found.

Microsoft Dynamics AX forum
Suggested answer

Display financial Dimension

Posted on by 2,721


i want to display one single financial dimension (from a set of 5 ) in a grid

Anyone can give me a hint .. guess is simple .. but im not a dev guy



  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Display financial Dimension

    Hi ArneChristensen

    The code you suggest is just display the dimension value, not the description of the financial dimension

    Can you show how to do it if I want to display the description as well?

    Thanks and Regards,


  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Display financial Dimension (AX2012 R2)

    Thank you this helped me in a requirement today.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Display financial Dimension (AX2012 R2)

    You can do it quite simple like this:

    Add this display method behind InventTable (..or behind whatever table you want to pull from)

    display ItemGroupId getDimensionDepartment()
    DimensionAttributeValueSetStorage dimStorageProduct;
    DimensionValue productDepartment;

    // Get current Department financial dimension from the product
    dimStorageProduct = DimensionAttributeValueSetStorage::find(this.DefaultDimension);
    productDepartment = dimStorageProduct.getDisplayValueByDimensionAttribute(DimensionAttribute::findByName('Department').RecId);

    return productDepartment;


  • Suggested answer
    Ali Zaidi Profile Picture
    Ali Zaidi 4,657 on at
    RE: Display financial Dimension (AX2012 R2)

    Its really bit Techy.  For example if you get Top one value for Default DemensionValue for Vendor then have to Add Display method in Vendor table. Display method return the value of extend data type. So in Extended Data Type of Displayname is “DimensionValue.“ for DimensionAttributeValueSetItem

    display DimensionValue getDefaultDepartmentValue()


       VendTable vendTable;

    DimensionAttributeValueset dimAttrValueSet;

    DimensionAttributeValueSetItem dimAttrValueSetItem;

    DimensionAttributeValue dimAttrValue;

    DimensionAttribute dimAttr;

       DimensionValue dimValue;

        select firstOnly  dimAttr

       where   dimAttr.Name=="Department";

       while select firstonly1 * from vendTable

    order by DimAttrValueSetItem.DisplayValue desc

    join dimAttrValueSet

    where dimAttrValueSet.RecId== vendTable.DefaultDimension

    join  dimAttrValueSetItem

    where dimAttrValueSetItem.DimensionAttributeValueSet==dimAttrValueSet.RecId

       join dimAttrValue

       where dimAttrValueSetItem.DimensionAttributeValue==dimAttrValue.RecId

    && dimAttrValue.DimensionAttribute== dimAttr.RecId




    return dimValue


    After compile the Vendor table. This method is available VendTable datasource. Now drop a string Edit on Grid and set the DataSource property for the control to the VendTable and Set the DataMethod property to the name of the display method  “getDefaultDepartmentValue”.

    You can modify display Method logic as per your requirement.

  • dolee Profile Picture
    dolee 11,279 on at
    RE: Display financial Dimension (AX2012 R2)


    The method I know of doing this is to write a display method ( based on theDefaultDimension. The table linkage would be like the example here (

    So it's a bit techy actually. :)


Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,663 Super User

Martin Dráb Profile Picture

Martin Dráb 224,741 Super User

nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans