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

Notifications

Announcements

No record found.

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)
  • Verified answer
    Mea_ Profile Picture
    60,284 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.

  • André Arnaud de Calavon Profile Picture
    300,911 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.

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

  • 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]

  • 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
    Community Member Profile Picture
    on at

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

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans