This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
This post is part of the series »Dynamics AX 2012 - Financial dimensions«
In Dynamics AX 2012, the handling of financial dimensions has changed. Both on the surface and the underlying data model.
In earlier versions you find one field - usually named dimension - of type array. Now you'll find a field derived from RecId called DefaultDimension (or similar).
In this series I want to specifically address these changes and present one or the other piece of code.
|
|
|
|
|
|
In the following code-example a record is selected from table LedgerJournalTrans, than the value of the field LedgerDimension respectively the field OffsetLedgerDimension is converted in the display value, which is display in a so called Segemented entry control.
static void GetLedgerDimensionDisplayValue(Args _args) { DimensionStorage dimensionStorage; DimensionDisplayValue DimensionDisplayValue; ledgerJournalTrans ledgerJournalTrans = LedgerJournalTrans::findRecId(5637169330, false); // LedgerDimension dimensionStorage = DimensionStorage::findById(ledgerJournalTrans.LedgerDimension); DimensionDisplayValue = dimensionStorage.getComboDisplayValue(); info(DimensionDisplayValue); // OffsetLedgerDimension dimensionStorage = DimensionStorage::findById(ledgerJournalTrans.OffsetLedgerDimension); DimensionDisplayValue = dimensionStorage.getComboDisplayValue(); info(DimensionDisplayValue); }Output for example:
5170-10-00AB03---1500-