Tuesday 30 June 2015

Copy dimension from one table to another in Ax 2012

Use the below method to copy the dimension from one table another table by passing the default dimension value.

public DimensionDefault copyDimension(
    DimensionDefault _defaultDimension,
    DimensionCopy    _dimensionCopy = DimensionCopy::newFromTable(this, CompanyInfo::findDataArea(this.company()).RecId)
    )
{
    return _dimensionCopy.copy(_defaultDimension);
}


Wednesday 17 June 2015

Specific dimension display in Ax 2012

private Description DimensionbyDept()
{
    DimensionAttributeValueSetStorage dimStorage;
    Counter i;
    str 20 dim;
    int64 n;

    dimStorage = DimensionAttributeValueSetStorage::find("DefaultDimension");

        for (i=1 ; i<= dimStorage.elements() ; i++)
    {
        if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == 'Department')
        {
            n= dimStorage.getValueByIndex(i);
        }
        dim = DimensionFinancialTag::find(n).Description;

    }
    return dim;

Microsoft Dynamics AX 2012 R3 cumulative update 9

Recently Microsoft released cumulative update 9 for AX 2012 R2 and R3.

Please follow the link to get to know the features comes with latest update pack.

AX 2012 R3 cumulative update 9

Tuesday 2 June 2015

The call to clear the report server caches failed in AX 2012





You'll be getting the below error when refreshing the Report server caches in
AX 2012 Development ->Tools->Caches-> Refresh report server.








Even if you try to validate the report server configuration too, will end up in error.
Try running Ax 2012 as Run as Administrator and check the same.

Deleting unused Main Account Values in Ax 2012

A financial dimension value is based on the Main Account  record and has been used on a transaction, You cannot delete the Main Account record. 

In order to get rid off un-used dimension values, delete the related records in the following tables
1.DimensionAttributeValueCombination
By default the ledger dimension values are stored in DimensionAttributeValueCombination.
The DimensionAttributeValueCombination table contains information about accounts and various dimensions combinations that are used. Anything that uses dimensions will hold reference to a record on this table. 
2.DimensionAttributeLevelValue
This table contains the usage of  a dimension attribute value in a given dimension hierarchy.
3.DimensionAttributeValueGroup
This table represents a group of values for the specific dimension set.
4.DimensionAttributeValueGroupCombination
It contains the usage of dimension code groups in a  dimension code combination.
It allows a group to be re-used in multiple combination.
5.DimensionAttributeValue
This table contains the values, such as dimension codes, for a specific dimension.

After removing the reference records in the above tables, you can remove main account from its master itself.


Calculate ledger balance by dimension set in X++ in AX2012/Dynamics 365 FO

There are a variety of ways users can view balances in the general ledger. Some of the most common options are: 1. Trial balance 2. Financia...