Skip to main content

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

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.

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. This is a good article & good site.Thank you for sharing this article. It is help us following categorize:
    healthcare, e commerce, programming, multi platform,inventory management, cloud-based solutions, it consulting, retail, manufacturing
    at this website

    ReplyDelete

Post a Comment