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)

Post multi ledger journals X++

(0) ShareShare
ReportReport
Posted on by 130

Hi experts,

I want to ask about posting Ledger journals using X++.

I have many Ledger journals need to be posted one by one. I'm using class LedgerJournalCheckPost run() to do the posting for journals. My scenario is: I have 3 journals A, B, C. If an error occurs when posting journal A, It will stop the process, right? I want to skip posting journal A and move on to journal B and C then post them. Can it be done in X++?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    If you make a TTS block around the loop of the journal headers and the posting, whenever an error occurs it will roll back the whole transaction. Obviously do not put a TTS block around it and then it will work, the posting itself does open a new transaction anyways.

  • Manikanda Gopal Profile Picture
    258 on at

    Hi LongTNH,

    Have you find the solutions for this issue?

    We are also facing the same problem.

    Thanks in advance.

  • Suggested answer
    axk Profile Picture
    925 on at

    Hey Jackie,


    Did you try putting journal posting into try-catch block and if error is thrown during first posting, it continues? Something like:

        while ( ... )
        {
            try
            {
                // Try to post journal A
            }
            catch
            {
                continue;
            }
        }

    Let me know if it worked for you!

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