Merge financial dimensions in D365 F&O with x++

To merge the default dimensions in Dynamics 365 F&O you can use the following code snippet:

jourTrans.DefaultDimension = LedgerDimensionDefaultFacade::serviceMergeDefaultDimensions(salesLine.DefaultDimension, inventTable.DefaultDimension);

In this method of merging financial dimensions, you do not need any other objects other than at least two DimensionDefault values. The merged dimension is initialized from the first supplied default dimension values. Subsequent dimension values are added to the merged dimension if they are blank in the merged dimension.

Lascia un commento