This post is machine-translated. The original post in german language can be found here.

AX 2012: Show RecId of type LedgerDimension as Display value

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();
     // OffsetLedgerDimension
    dimensionStorage = DimensionStorage::findById(ledgerJournalTrans.OffsetLedgerDimension);
    DimensionDisplayValue = dimensionStorage.getComboDisplayValue();

Output for example:

These post applies to following version:
Dynamics AX 2012

Add comment


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.

Show all posts from this series

RSS-Feed of this blog series


Posts of the actual month
November 2023
© 2006-2023 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.