Reputation: 149
I want to get the department from the default dimension in AX 2012.
In the LedgerJournalTrans->lines->FinancialDimension
I can fill the department but in the database for AX the default dimension is saved.
I'm working on SSRS reports d=so I want to get the department in SQL query.
Can anyone help me how to get the department and explain simply the relations
Thank you in advance and best regards,
Upvotes: 0
Views: 10420
Reputation: 106
You can use this in SQL:
select DisplayValue from DefaultDimensionView
where DefaultDimension = 1234567890
and Name ='Department'
In X++:
select DisplayValue from defaultDimensionView
where defaultDimensionView.DefaultDimension == this.DefaultDimension
&& defaultDimensionView.Name == 'Department';
Upvotes: 2
Reputation: 1151
Edit: as pointed out this is for ledger dimension and not default dimension, but I'll leave it for info:
Check out the DimensionAttributeLevelValueAllView
view. It contains all the data you need.
DimensionAttributeValueGroup
field using the ledgerdimension recid from ledgerjournaltrans. DisplayValue
contains the value of the dimensionDimensionAttribute
field refers to the dimension, for example the department, and it links to the DimensionAttribute
table. This is setup so you'll have to store the recid for the department somewhere and join with this setup field. Otherwise there is no way to 'know' which of those dimensions the department dimension is. Upvotes: 0
Reputation: 455
see: How to set a single dimension value in AX 2012?
has a good whitepaper mentioned
Upvotes: 0