Active Ledger Dimension
You can use the following code sample to tet ledger dimension values for active account structure in AX 2012 & D365FO
public static DimensionValue getdimensionValue(LedgerDimensionAccount _ledgerDimension, Name _dimensionName )
{
DimensionAttributeLevelValueAllView dimAttrView; //View that will
display all values for ledger dimensionsDimensionAttribute dimAttr; //Main
dimension attribute table
select DisplayValue from dimAttrViewwhere
dimAttrView.ValueCombinationRecId == _ledgerDimension //generalJournalAccountEntry.LedgerDimensionjoin
BackingEntityType from dimAttrwhere dimAttr.RecId ==
dimAttrView.DimensionAttribute&& dimAttr.Name == _dimensionName; //
Dimension field name
return dimAttrView.DisplayValue;
}
No comments:
Post a Comment