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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to find the dimension attribute values based on the account structure?

(0) ShareShare
ReportReport
Posted on by 705

Hi,

I have defined an account structure i.e. BusinessUnit --> Department --> MainAccount.

In the account structure I have specified some ranges for all the above.

Now I have a requirement where I need to fetch the values of valid dimension attribute according to the range I am setting OR even if I am specifying all values in the structure, I should get all the values.

Is there a class/method in AX which returns me back valid dimension attributes based on the ranges I set.

I have seen a class "DimensionValueService" method (getDimensionValueLocalList()) which is returning all the attributes irrespective of the range criteria.

Can someone please help me how It can be done?

Regards,

Nishant

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    If you want to return the dimension value in the financial dimension or all the values you can use this:

       DimensionAttributeValueSet           DimensionAttributeValueSet;

       DimensionAttributeValueSetItem       DimensionAttributeValueSetItem;

       DimensionAttributeValue              DimensionAttributeValue;

       DimensionAttribute                   DimensionAttribute;

       SalesTable                           salesTableLocal;

       DimensionValue                       dimensionValue;

       while select * from salesTableLocal

               where salesTableLocal.SalesId == _salesId

       join RecId from DimensionAttributeValueSet

               where  DimensionAttributeValueSet.RecId == salesTableLocal.DefaultDimension

       join RecId, DisplayValue from DimensionAttributeValueSetItem

               where DimensionAttributeValueSetItem.DimensionAttributeValueSet == DimensionAttributeValueSet.RecId

       join RecId from DimensionAttributeValue

               where DimensionAttributeValue.RecId == DimensionAttributeValueSetItem.DimensionAttributeValue

       join RecId, Name from DimensionAttribute

               where DimensionAttribute.RecId == DimensionAttributeValue.DimensionAttribute &&

               DimensionAttribute.Name == "CustomerGPO"

           {

               dimensionValue = DimensionAttributeValueSetItem.DisplayValue;

           }

       return dimensionValue;

    Change the DimensioAttribute.Name to see all the financial dimension selected in that sales order.

    you can use this code for all the tables that are using DefautDimension.

    I hope this help you.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans