I looking for example how to create general journal in AX7.
In Ax2012 I created general journal with class AxLedgerJournalTable and AxLedgerJournalTrans.
blogs.msdn.microsoft.com/axsupport/2011/12/21/creating-general-journals-in-ax-2012-in-x
How can I do that in Ax7 ?
*This post is locked for comments
Hi Hichem Chekebkeb,
Thanks for the post.
I have used your approach. The only challenge I am facing is, My user want to give the account and offset account in display values(for eg: if ledger, mainaccount-dep-costcenter and if vendor, vendacount). So, I am stuck at how to convert those display values to ledger dimension keeping account type into consideration. Please suggest an approach for this.
For people having the same request I posted an interesting post about how to generate journal vouchers in AX7. Link: [View:https://community.dynamics.com/ax/b/dynamicsaxthehardway/archive/2017/10/26/how-to-generate-ledger-vouchers-using-dataentities-and-x-in-dynamics-365-for-operations]
Hi Andre,
I am using JournalTableData and JournaTransData to create new line to existing journal as below however keep getting field Id 0 does not exist on journalTransData.create() method. Can you see I am missing anything in below lines.
LedgerJournalTrans jourTrans;
LedgerJournalTableData jourTableData;
LedgerJournalStatic jourStatic;
JournalTransData jourTransData;
jourTableData = JournalTableData::newTable(_ledgerJournalTable);
//jourTableData.journalTable(_ledgerJournalTable);
jourTableData.initFromLedgerJournalTable(_ledgerJournalTable);
jourTableData.initFromJournalName(LedgerJournalName::find(_ledgerJournalTable.JournalName));
jourStatic = jourTableData.journalStatic();
jourTransData = jourStatic.newJournalTransData(jourTrans, jourTableData);
jourTransData.initFromJournalTable();
jourTrans.CurrencyCode = _ledgerJournalTrans.CurrencyCode;
jourTrans.TransDate = _ledgerJournalTrans.TransDate;
jourTrans.parmLedgerDimension(_ledgerJournalTrans.LedgerDimension);
jourTrans.Txt = _ledgerJournalTrans.Txt;
jourTrans.parmOffsetLedgerDimension(_ledgerJournalTrans.OffsetLedgerDimension);
jourTrans.AmountCurCredit = __ledgerJournalTrans.AmountCurCredit;
jourTransData.create();
Hi IKSIKS,
In addition to ievgen's answer you can also use the classes JournalTableData and JournalTransData to create journals.
You can look at MCRLedgerJournal class it creates ledger Journal and lines using "old school" way, operating directly with tables and ledgetJournalEngine.
Another thing you can look at is LedgerJournal* data entities its a real replacement of Ax classes.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156