web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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

I have the same question (0)
  • dolee Profile Picture
    11,279 on at

    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

  • Suggested answer
    Ali Zaidi Profile Picture
    4,657 on at

    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.

  • Community Member Profile Picture
    on at

    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;

    }

  • Community Member Profile Picture
    on at

    Thank you this helped me in a requirement today.

  • Community Member Profile Picture
    on at

    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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans