15 December 2017

How to get ledger dimension values for active account structure in AX 2012 AX7 D365

public static DimensionValue dimensionDisplayValue(LedgerDimensionAccount _ledgerDimension, Name _dimensionName )
{
DimensionAttributeLevelValueAllView dimAttrView; //View that will display all values for ledger dimensions
DimensionAttribute dimAttr; //Main dimension attribute table


select DisplayValue from dimAttrView
where dimAttrView.ValueCombinationRecId == _ledgerDimension //generalJournalAccountEntry.LedgerDimension
join BackingEntityType from dimAttr
where dimAttr.RecId == dimAttrView.DimensionAttribute
&& dimAttr.Name == _dimensionName; // Dimension field name

return dimAttrView.DisplayValue;
}

No comments:

Post a Comment

Give me the commetns and solutions

AXmodel file import in D365 F&O

 ModelUtil.exe -import -metadatastorepath=k:\aosservice\packageslocaldirectory -file=C:\Temp\DEST.axmodel