Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Display financial Dimension

(0) ShareShare
ReportReport
Posted on by

Hi

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

thx

Pirmin

*This post is locked for comments

  • Community Member Profile Picture
    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,

    Enggar

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

    Thank you this helped me in a requirement today.

  • Community Member Profile Picture
    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
    4,655 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

    {

       dimValue=dimAttrValueSetItem.DisplayValue;

    }

    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
    11,279 on at
    RE: Display financial Dimension (AX2012 R2)

    Hi,

    The method I know of doing this is to write a display method (msdn.microsoft.com/.../aa595058.aspx) based on theDefaultDimension. The table linkage would be like the example here (domhk.blogspot.hk/.../ax2012-sort-records-by-default-dimension_18.html)

    So it's a bit techy actually. :)

    Regards

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
Zain Mehmood Profile Picture

Zain Mehmood 6 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans