Olaru Mircea
Olaru Mircea

Reputation: 2620

LedgerDimension to MainAccount,CostCenter and Department

I am trying to get the CostCenter, MainAccount and Department starting from the LedgerDimension field in the LedgerJournalTrans table.

I found this but I am lost.

http://ax2009developer.blogspot.ro/2014/02/how-create-customize-look-up-for.html

In fact, for this task, I have implemented only queries in AOT. Is there any way to join some tables and get there without taking the X++ approach?

enter image description here

Upvotes: 0

Views: 3049

Answers (2)

Geoffrey DELMEE
Geoffrey DELMEE

Reputation: 782

Financial dimensions in AX 2012 are far more complicated than in previous versions.

You should start with this white paper: http://download.microsoft.com/download/4/E/3/4E36B655-568E-4D4A-B161-152B28BAAF30/Implementing_the_Account_and_Financial_Dimensions_Framework_AX2012.pdf

You'll find the tables involved and their relations.

By the way, I recommend you not to build your own queries. As the model is really versatile, it will be first tricky to build your query, then they will not be performant.

You need to use the APIs as they are already built and also as they use the system global object cache to cache data, as the model is not set for fast queries.

Upvotes: 2

William YK
William YK

Reputation: 1125

Unfortunately, I don't believe there is an easy way to do what you want with queries only and X++ is the way to go.

You could, in theory, create a view that you would use in your query objects. It would have tables DimensionAttribute, DimensionAttributeValueSet DimensionAttributeValueSetItem, and DimensionAttributeValue I think. And multiple instances of each in some cases.

Then in your view, you'd set ranges with your different Attribute names. This is fairly complex, but you could repeatedly use it on any query. I could see value in it for sure, but if you've not worked much with dimensions, you have some learning to do to get that working.

Upvotes: 1

Related Questions