Create and post General Ledger journal with financial Dimensions Value using X++


I am using Ax2012.

I am trying to create and post general ledger journal with financial dimensions Value but i am getting an error as Financial dimension value does not exist.

I Have given my code please help me solve the issue.

static void LearningGeneralJournal(Args _args)
    AxLedgerJournalTable    journalTable;
    AxLedgerJournalTrans    journalTrans;
    container               acctPattern;
    container               offSetAcctPattern;
    LedgerJournalTable      ledgerJournalTable;
    LedgerJournalTrans      ledgerJournalTrans;
    ledgerJournalCheckPost  ledgerJournalCheckPost;
    journalTable = new AxLedgerJournalTable();
    journalTrans = new AxLedgerJournalTrans();

    //Journal Name
    acctPattern = ["420100", "420100",2,"Agreement","OU_3566","Training"];
    journalTrans.parmOffsetAccountType(LedgerJournalACType:: Ledger );
    offSetAcctPattern = ["0101", "0101",0,"00000036","OU_3566","Training"];

    ledgerJournalCheckPost = ledgerJournalCheckPost::newLedgerJournalTable(journalTable.ledgerJournalTable(),NoYes::Yes);;

    info(strFmt("Journal No. %1.", journalTable.ledgerJournalTable().JournalNum));

I couldnt able to find the financial dimension value.


What error you are getting?

Financial dimension value OU_3566 does not exist.

Can you explain your pattern, offSetAcctPattern = [“0101”, “0101”,0,“00000036”,“OU_3566”,“Training”];

Please refer this,…/

0101- is the display value
0101- MainAccount
00000036 - dimensionAttribute Name
OU_3566 - dimensionAttribute Value

The same as like what u have sent in the link if i give the values in the link I am getting the error in the value “country”

That is an example, country could be the attribute name.

Have you checked if the dimension value is valid? General ledger → setup - financial dimensions

Hey thanks I just checked the dimension value . For agreement there is no dimensional value.I changed and it is working properly .
Thank you so much for your help.