web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Creating General Journals in AX7 in X++

(0) ShareShare
ReportReport
Posted on by 1,535

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

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
  • VermaMC Profile Picture
    471 on at

    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.

  • Suggested answer
    Hichem.Chekebkeb Profile Picture
    3,371 on at

    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]

  • Community Member Profile Picture
    on at

    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();

  • André Arnaud de Calavon Profile Picture
    301,809 Super User 2025 Season 2 on at

    Hi IKSIKS,

    In addition to ievgen's answer you can also use the classes JournalTableData and JournalTransData to create journals.

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Volodya Profile Picture

Volodya 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans