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

AX 2012: Selecting the values of a financial dimension

The following job demonstrates how to display the values of a financial dimension - in the example Department - via X++.

static void getValues4Dimension(Args _args)
{
    DimensionValueService dimensionValueService;
    DimensionContract dimensionContract;
    List dimensionValueContractList;
    ListEnumerator listEnumerator ;
    DimensionValueContract dimensionValueContract;
    DimensionValue dimensionValue;

    dimensionValueService = new DimensionValueService();
    dimensionContract = new DimensionContract();
    dimensionContract.parmDimensionName('Department');
    dimensionValueContractList = dimensionValueService.getDimensionValues(dimensionContract);
    listEnumerator = dimensionValueContractList.getEnumerator();

    setPrefix(strFmt("Dimension %1: ", dimensionContract.parmDimensionName()));
    while(listEnumerator.moveNext())
    {
        dimensionValueContract = listEnumerator.current();
        dimensionValue = dimensionValueContract.parmValue();

        info(dimensionValue);
    }
}
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
März 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
25262728293031
 
© 2006-2024 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.