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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Error when called _LedgerJournalCheckPost.CheckJournal() x++

(0) ShareShare
ReportReport
Posted on by 163

I want to call CheckJournal to check on all lines in Journal and know if it had error or not but I got this error 

  1. Microsoft.Dynamics.Ax.Xpp.ClrErrorException: NullReferenceException ---> System.NullReferenceException: Object reference not set to an instance of an object. at Dynamics.AX.Application.LedgerJournalCheckPost.`progressUpdate(String _text) at Dynamics.AX.Application.LedgerJournalCheckPost.progressUpdate(String _text) at Dynamics.AX.Application.LedgerJournalCheckPost.`displayProgress(String _voucher, Date _transDate) at Dynamics.AX.Application.LedgerJournalCheckPost.displayProgress(String _voucher, Date _transDate) at Dynamics.AX.Application.LedgerJournalCheckPost.`checkJournalStatus() at Dynamics.AX.Application.LedgerJournalCheckPost.LedgerJournalCheckPostCoCHelper.`checkJournalStatus(LedgerJournalCheckPost instance) at Dynamics.AX.Application.LedgerJournalCheckPost_BE_ApplicationSuite_Extension.checkJournalStatus(LedgerJournalCheckPost this) at Dynamics.AX.Application.LedgerJournalCheckPost.LedgerJournalCheckPostCoCHelper.`checkJournalStatus(LedgerJournalCheckPost instance) at Dynamics.AX.Application.LedgerJournalCheckPost.checkJournalStatus() at Dynamics.AX.Application.LedgerJournalCheckPost.`checkJournal() at Dynamics.AX.Application.LedgerJournalCheckPost.checkJournal() at LedgerJournalCheckPost::checkJournal(Object , Object[ , Boolean& ) at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[ parameters) --- End of inner exception stack trace --- at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[ parameters) at Dynamics.AX.Application.LedgerJournalCheckPost_Extension.`CheckJour(LedgerJournalCheckPost this) in xppSource://Source/CFMUpgradeModel01\AxClass_LedgerJournalCheckPost_Extension.xpp:line 26 at Dynamics.AX.Application.LedgerJournalCheckPost_Extension.CheckJour(LedgerJournalCheckPost this) at Dynamics.AX.Application.Testt.`main(Args _args) in xppSource://Source/CFMUpgradeModel01\AxClass_Testt.xpp:line 86 at Dynamics.AX.Application.Testt.main(Args _args) at Testt::Main(Object[ , Boolean& ) at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[ parameters) at Dynamics.AX.Application.SysClassRunnerHelper.`runMainMethod(SysClassRunnerState state) in xppSource://Source/ApplicationFoundation\AxClass_SysClassRunnerHelper.xpp:line 30 at Dynamics.AX.Application.SysClassRunnerHelper.runMainMethod(SysClassRunnerState state) at Dynamics.AX.Application.Forms.SysClassRunner.FormControl.timerControl.elapsed() in xppSource://Source/ApplicationFoundation\AxForm_SysClassRunner.xpp:line 52
  2. Object reference not set to an instance of an object.

  while select  LedgerJournalTrans
            order by LedgerJournalTrans.LineNum
            where LedgerJournalTrans.JournalNum == "CFM-119312"

       outer  join LedgerJournalProject
            where LedgerJournalProject.RefRecId == LedgerJournalTrans.RecId
        {

            _LedgerJournalCheckPost =LedgerJournalCheckPost::newLedgerJournalTrans(LedgerJournalTrans,LedgerJournalVoucher::Journal,NoYes::Yes);
            
	    	Boolean	check  = _LedgerJournalCheckPost.CheckJournal(); 
		
		if (!Check)
		{
		   sysInfologEnumerator = SysInfologEnumerator::newData(infolog.infologData());
                while (sysInfologEnumerator.moveNext() )
                {
                    message = sysInfologEnumerator.currentMessage();
                    Info(message);

                }
		}
		
			}

I have the same question (0)
  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    RE: Error when called _LedgerJournalCheckPost.CheckJournal() x++

    Use the debugger to find out more details about the problem. According to the stack trace, the exception seems to be thrown in LedgerJournalCheckPost.progressUpdate(), therefore that would be a good place to start with.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans