Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

Non Ledger Financial Dimensions

$
0
0

Hello All,

I doing Non-Ledger(For Customer and vendor) GL Integration. Here is my code that i am using to integration.Integration is working fine but for custome i am not able to integrate financial dimensions. Please help to find a way.

 AxLedgerJournalTable    journalTable;

    AxLedgerJournalTrans    journalTrans;

    container               acctPattern;

    container               offSetAcctPattern;

    DataAreaId areaid="USMF";

    LedgerJournalTable      ledgerJournalTable;

    ledgerJournalCheckPost  ledgerJournalCheckPost;

    LedgerDimensionAccount  ledgerDim;

    DimensionDefault df;

    DimensionValueService ser;

    DimensionValueContract s1;

    Counter retryCount;

 

    #define.RMax(5)

    ;

    journalTable = new AxLedgerJournalTable();

    journalTrans = new AxLedgerJournalTrans();

 

    //Journal Name

    journalTable.parmJournalName("SLSINV");

    journalTable.save();

    journalTrans.parmJournalNum(journalTable.ledgerJournalTable().JournalNum);

    journalTrans.parmTransDate(systemDateGet());

    journalTrans.parmCurrencyCode("USD");

    journalTrans.parmAmountCurDebit(200);

    journalTrans.parmAccountType(LedgerJournalACType::Cust);

    journalTrans.parmLedgerDimension(DimensionStorage::getDynamicAccount("256712",LedgerJournalACType::Cust));

 

    //Off set Account setting

 

    acctPattern = ["110110","110110", 2, "BusinessUnit","001", "Department", "022"];

    journalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(acctPattern));

 

    journalTrans.parmInvoice("1234");

 

    try

    {

    journalTrans.save();

    }

    catch(Exception::Error)

    {

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

        journalTable.delete();

    }


Viewing all articles
Browse latest Browse all 9880

Trending Articles