Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Job journal posting error

(0) ShareShare
ReportReport
Posted on by

Dear Fellows,

My company has been using Microsoft dynamics NAV 2016 for the last two years. A couple of days ago one of the end users want to post entry in the JOB Journal but an error message which reads:

Microsoft Dynamics NAV
---------------------------

The object has been run. Use the function CLEAR(Report).
---------------------------
OK
---------------------------

keeps poping up and the posting process fails, what could be the cause of this error message. I really need your help ASAP.

for more info, here is the screen shot of the message 

4812.Error-Message.png

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Job journal posting error

    No, tested and it works. This issues was fixed in the following releases.

    The line of code simply re-initialize the variable used for posting for passing the new filters on every iteration.

  • RE: Job journal posting error

    Hello Stefano,

    First i would like to thank every one who participated to give solution to the issue i posted. i really appreciate it.

    especially Thank You Stefano, I added the code you suggested the entry posted with out any problem. the solution works like charm. I have one question though , does the change in the code could affect any other item cost adjustment entries or cause and issue on other item related transaction, what do you think?,

    And also for my understanding on the issues  can you give me a brief explanation why the issue was happening and what the code you added does? thank you again  for your support.

  • Suggested answer
    CDsilva Profile Picture
    CDsilva 4,184 on at
    RE: Job journal posting error

    Hi,

    Use session debugging, it will direct you to th error

  • Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: Job journal posting error

    Hi Bifa,

    On the Post Action check what Customisation is done. Do not comment any code but if Report object is called then use CLEAR(ReportObject).

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Job journal posting error

    To solve your issue, the code must be the following:

    LOCAL UpdateJobItemCost()

    IF JobsSetup.FIND THEN
    IF JobsSetup."Automatic Update Job Item Cost" THEN BEGIN
    IF TempJobToAdjustBuf.FINDSET THEN
    REPEAT
    Job.SETRANGE("No.",TempJobToAdjustBuf."No.");
    CLEAR(UpdateJobItemCost);       //<-- ADD THIS LINE!!
    UpdateJobItemCost.SETTABLEVIEW(Job);
    UpdateJobItemCost.USEREQUESTPAGE := FALSE;
    UpdateJobItemCost.SetProperties(TRUE);
    UpdateJobItemCost.RUNMODAL;
    UNTIL TempJobToAdjustBuf.NEXT = 0;
    END;

  • RE: Job journal posting error

    Do you think it will cause me some other issues if i comment out the code line in the code unit? what do you think i should do?

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Job journal posting error

    RUNMODAL inside a loop? This seems a wrong code.

    You can place CLEAR(UpdateJobItemCost) just after the REPEAT line but this code seems wrong to me.

    A RUNMODAL waits for user input and inside a loop it’s very bad because it locks the transaction.

  • RE: Job journal posting error

    Hello Stefano,

    When i debug it here is what i found the error message pops up when it reaches the yellow color highlighted line of code ,  any idea what that is and any suggestion on how to fix it, because i'm not that familiar with C/AL codes

    4478.debugger.PNG

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Job journal posting error

    It seems so strange that the Job Journal posting is calling a report variable. Are you able to activate debugger? If so, you can see immediately where the problem is. I suspect you have here a custom implementation, maybe that opens a report after posting?

  • RE: Job journal posting error

    Thank You Olister for your swift reply,

    I've tried the closing the page and repeating the posting process it gives me the same error.

    However the first solution you suggested "Add the CLEAR(ReportName) code wherever the Job is called" , how do i add the CLEAR(ReportName) in the job journal, can you give me a detailed explanation on that?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans