Interview Questions

Thursday, February 2, 2017

Print financial dimension applied on any sales order in AX

static void DEV_Dimension(Args _args)
{
    CustTable                                              custTable = CustTable::find("1101");
    DimensionAttributeValueSetStorage       dimStorage;
    Counter i;
    
    dimStorage = DimensionAttributeValueSetStorage::find(custTable.DefaultDimension);

    for (i=1 ; i<= dimStorage.elements() ; i++)
    {
        info(strFmt("%1 = %2", DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,      
                               dimStorage.getDisplayValueByIndex(i)));
    }
} 

No comments:

Post a Comment