Hi,
I'm trying to make General Journal JVs programmatically. Though the header entry is created, amount is displayed, the lines are not showing in the form.
Here is my code:
static void createJV(Args _args) { AxLedgerJournalTable journalTable; AxLedgerJournalTrans line1; container acctPattern; container offSetAcctPattern; LedgerJournalTable ledgerJournalTable; ledgerJournalCheckPost ledgerJournalCheckPost; DimensionDynamicAccount ledgerDim; journalTable = new AxLedgerJournalTable(); line1 = new AxLedgerJournalTrans(); //Journal Name journalTable.parmJournalName("GenJrn"); journalTable.save(); line1.parmJournalNum(journalTable.ledgerJournalTable().JournalNum); line1.parmTransDate(systemDateGet()); //line1.parmAmountCurDebit(200); line1.parmAmountCurCredit(200); line1.parmAccountType(LedgerJournalACType::Ledger); acctPattern = ["100000", "100000",1,"State","DEL"]; line1.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(acctPattern)); line1.parmOffsetAccountType(LedgerJournalACType:: Ledger ); offSetAcctPattern = ["200000", "200000",1, "State", "GOA"]; line1.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId( offSetAcctPattern)); line1.save(); }
Here is the Form snapshot: