Skip to main content

Notifications

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

                }
		}
		
			}

  • Martin Dráb Profile Picture
    Martin Dráb 230,962 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans