web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Dynamics 365 For Operations [D365FO]: Ledger dimension and Default dimension helper class

Vishal Tiwari Profile Picture Vishal Tiwari 393
Hello guys, I would be posting the important classes which handles the ledger dimension and default dimension logics like merging or replacing in D365FO (Dynamics 365 for operations). Like how we used to have DiemsionDefaultingService class in AX2012, We have the following two classes shown below:

LedgerDimensionFacade : 

This class used for fixed LedgerDimension, we have many static methods here, like Merge Dimension, getdefaultDimension and many more, refer below image.


      public static DimensionDisplayValue getDisplayValueForLedgerDimension(DimensionCombinationBase _dimensionCombinationBase)
    {
        DimensionAttributeValueCombination dimensionAttributeValueCombination;

        if (_dimensionCombinationBase == 0)
        {
            return "";
        }

        select firstonly DisplayValue from dimensionAttributeValueCombination
            where dimensionAttributeValueCombination.RecId == _dimensionCombinationBase;

        return dimensionAttributeValueCombination.DisplayValue;
    }



LedgerDimensionDefaultFacade: 

This class will help us to perform action over default dimension. Like Merge specify default dimension into single default dimension, replace attribute value etc.

Both classed having almost same method that is available in AX with DiemsionDefaultingService class.

This was originally posted here.

Comments

*This post is locked for comments