To reviewAX 2012

Merge a ledger dimension with default dimensions in X++

AX 2012: combine a ledger dimension with one or more default financial dimensions with DimensionDefaultingService::serviceCreateLedgerDimension.

Written for AX 2012; check DimensionDefaultingService and its current replacement on D365FO.

First written
Re-read
Versions
AX 2012

A common need when you build journal lines in code: take a main account combination and apply the default dimensions of a customer, vendor or other source. In AX 2012 one call did it.

The original note

To merge a ledger dimension with one or more default financial dimensions, use this call:

DimensionDefaultingService::serviceCreateLedgerDimension(ledgerDimension, customerDefaultDimension);

You can merge more than two dimensions: you can pass several default dimensions to merge.

More details and a real implementation are in the Dynamics Community post linked below.

References