Tuesday 31 August 2021

Get ledger dimension values for active account structure in AX 2012 & D365FO

Here is the code  for  ledger dimension values for active account structure

public static DimensionValue getdimension(LedgerDimensionAccount _ledgerDimension, 

Name _dimensionName )

    {
        DimensionAttributeLevelValueAllView dimAttrView; //View that will display all values for ledger dimensionsDimensionAttribute dimAttr; 

        select DisplayValue from dimAttrViewwhere dimAttrView.ValueCombinationRecId == _ledgerDimension 
        return dimAttrView.DisplayValue;
    }

No comments:

Post a Comment

Difference Between Edit And Display Method in Ax

Display Method: The display method means that the method’s return value is being displayed on a form or a report.  This value is fixed and c...