Financial dimensions with AX 2012 collected in RecId fields and that RecId referes a couple of tables so it's a bit complicated. Fortunately there is a class for make it easy:
DimensionProvider dimProvider = new DimensionProvider();
dimProvider.addOrderByAttribute(BorAXJournalTrans_DS.query(),BorAXJournalTrans_DS.query().dataSourceNo(1).name(),
FieldStr(BorAXJournalTrans,DefaultDimension),
DimensionComponent::DimensionAttribute,SortOrder::Ascending,
"Department");
BorAXJournalTrans_DS.executeQuery();
If you don't want to use that class alternate is:
RecId depRecId = 5637152827; //RecId value of department dimension at DimensionAttribute table
BorAXJournalTrans boraxJournalTrans;
DimensionAttributeValueSet dimensionAttributeValueSet;
DimensionAttributeValueSetItem dimensionAttributeValueSetItem;
DimensionAttributeValue dimensionAttributeValue;
DimensionAttribute dimensionAttribute;
while SELECT firstOnly10 borAXJournalTrans
ORDER BY DimensionAttributeValueSetItem.DisplayValue
JOIN dimensionAttributeValueSet
where borAXJournalTrans.DefaultDimension == dimensionAttributeValueSet.RecId
JOIN dimensionAttributeValueSetItem
where dimensionAttributeValueSet.RecId == dimensionAttributeValueSetItem.DimensionAttributeValueSet
JOIN dimensionAttributeValue
where dimensionAttributeValueSetItem.DimensionAttributeValue == dimensionAttributeValue.RecId
JOIN dimensionAttribute
where dimensionAttributeValue.DimensionAttribute == dimensionAttribute.RecId &&
dimensionAttribute.RecId == depRecId
{
info(dimensionAttributeValueSetItem.DisplayValue);
}
financial etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
financial etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
13 Ekim 2017 Cuma
15 Eylül 2014 Pazartesi
AX 2012 - Create a new financial dimension which related a table(s)
I found the easy way that the way from a blog which referred Microsoft'un related white paper:
1-Duplicate one of views from AOT which beginned DimAttribute and new views name should be begin same DimAttribute word.
2. Main datasource name should be BackingEntity unrelated what name used with original table name.
3. All field names of view should be like these whatever original names:
Key - data source tables Surrogate key field. Like RecId...
Value - data source tables primary key . Like AccountNum...
Name - Description field. Like Description or CustomerName...
There are two ways to use this new dimension implementation:
AOS restart
or
DimensionCache::clearAllScopes();
command.
1-Duplicate one of views from AOT which beginned DimAttribute and new views name should be begin same DimAttribute word.
2. Main datasource name should be BackingEntity unrelated what name used with original table name.
3. All field names of view should be like these whatever original names:
Key - data source tables Surrogate key field. Like RecId...
Value - data source tables primary key . Like AccountNum...
Name - Description field. Like Description or CustomerName...
There are two ways to use this new dimension implementation:
AOS restart
or
DimensionCache::clearAllScopes();
command.
Kaydol:
Kayıtlar (Atom)