Sunday, June 20, 2021

Get Display values from Ledger Dimension x++

 class GlobalDisplayFromLedgerDimension

{

    public static str displayValue(RefRecId _LedgerDim,Name _AttribName)

    {

        DimensionAttributeLevelValueAllView dimAttrView;

        DimensionAttribute                  dimAttr;

        

        select DisplayValue from dimAttrView where dimAttrView.ValueCombinationRecId == _LedgerDim

          join dimAttr

            where dimAttr.RecId == dimAttrView.DimensionAttribute

            && dimAttr.Name == _AttribName;

        return dimAttrView.DisplayValue;

    }


}