Static DimensionDisplayValue getAttributeValueFromCombination(
DimensionAttributeValueCombination _combination,
Name _attributeName = 'BusinessUnit')
{
DimensionAttributeLevelValueView valueView;
DimensionAttribute attribute = DimensionAttribute::findByName(_attributeName); //Retrive attribute record by Name
select valueView
where valueView.ValueCombinationRecId == _combination.recId
&& valueView.DimensionAttribute == attribute.RecId; //Retrieve individual Dimension attribute record
return valueView.DisplayValue; //Retrive dimension attribute value
}
Reference :
https://d365ffo.com/2021/11/17/ax-d365fo-get-individual-dimensions-value-from-ledger-dimension-in-x/
No comments:
Post a Comment