Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

how to export Ledger dimensions in Excel file

$
0
0

Hi All,

I am exporting the ledger dimensions in an excel file which are related to expense. The path to see those dimensions are (Travel and Expense -> Travel end Expense form -> Click any of Expense Report number -> "Distirbut amount" button and -> Accounting distribution form. Here I have three values in "Ledger Account" field "2550-0123-660861---" but as I run the below code, it only shows two values Department and Cost center every time.

static void TFG_LedgerDimensionTesting(Args _args)

{

TrvExpTable tet = TrvExpTable::find("2550EXP-000000055");

DimensionAttributeValueSetStorage dimStorage;

Counter i;

dimStorage = DimensionAttributeValueSetStorage::find(tet.DefaultDimension);

for (i=1 ; i<= dimStorage.elements() ; i++)

{

info (strFmt("%1 = %2", DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,dimStorage.getDisplayValueByIndex(i)));

pause;

}

}

It never shows three values . Only shows two values. Could anyone let me know where am I missing in code ?  


Viewing all articles
Browse latest Browse all 175888

Trending Articles