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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / DAX Beginners / How to: Get a especific fin...

How to: Get a especific financial dimension value

Christian Silva Profile Picture Christian Silva 707

Good day everyone! Today I will leave a quick tip about how to get a specific financial dimension value through DimensionDefault.

If you don’t know what a financial dimension is, here is a quote from “Implementing the Account and Financial Dimensions Framework for Microsoft Dynamics AX 2012 Applications” White paper

A financial data classifier created from the parties, locations, products,
and activities in an organization and used for management reporting.

Follow the code:

private str getCostCenterByDefaultDimension(RecId _dimensionDefault)
{
    DimensionAttributeValueSetStorage   dimStorage;
    Str                                 costCenter;
    Counter                             i;
    
    // DimensionDefault is a RecId that combines all Dimension Values
    dimStorage = DimensionAttributeValueSetStorage::find(_dimensionDefault);
 

  
    for (i= 1 ; i<= dimStorage.elements() ; i++)
    {
        // Change the string "CostCenter" to whatever financial dimension you want
        if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == "CostCenter")
        {
            costCenter = dimStorage.getDisplayValueByIndex(i);
        }
    }
  
    return costCenter;
}

This was originally posted here.

Comments

*This post is locked for comments