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 NAV (Archived)
Suggested Answer

Skipping that Record when it hits an Error in the Job Queue

(0) ShareShare
ReportReport
Posted on by

When the job queue runs into an error, it will never get picked up again. This means that while the Job Queue is an automated process, the IT manager will need to monitor this every day to make sure every process
is running.
There are some processes where the error is fatal. In that case our Job Queue should run again automatically by skipping the current record which is getting error.

Can anyone help us..

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rehan Satti Profile Picture
    634 on at

    Hi jithendra.k

    I think the problem hare is that you should handle the error in your C/AL code.
    If you know which piece of code throws error.Then either stop executing that part of your code or try to run it again by handling that error.

    Then set the "Maximum No. of Attempts to Run " to a value that is realistic according to the amount of errors you expect the Job to throw before being able to complete.

    However coming back to you problem you can tackle  this problem in another way. Try to run schedule a separate job that checks the jobs and changes the status. This way you can control how often it runs and when to run and also not to reset the status if it’s the same error occur more than once.

    But I would not recommend this. I would say handle your error properly !

  • Suggested answer
    4BzSoftware Profile Picture
    6,073 on at

    Hi Jithendra.k,

    From NAV 2016, you can use Try function to handle errors and let system continue its process (before NAV 2016, we should use IF Codeunit.Run THEN ...). Besides, for job queue, we should use IF GUIALLOWED THEN ...

    Below link provides you more information about Handling Errors by Using Try Functions:

    msdn.microsoft.com/.../dn951443(v=nav.90).aspx

  • Suggested answer
    Mouli Kaku Profile Picture
    517 on at

    Obviously Try catch is the good way to do and there is an another way also

    www.dynamicsnavconsultant.com/restarting-job-queue-hits-error-dynamics-nav-2013

  • Suggested answer
    Rehan Satti Profile Picture
    634 on at

    100 agreed ! As Khoa Nguyen & Mouli kaku suggested Try catch is good way of handling the exceptions.

  • Suggested answer
    Tina Menezes Profile Picture
    2,582 on at

    Hi

    You need to customize standard code for this issue. You can check this blog:

    www.dynamicsnavconsultant.com/restarting-job-queue-hits-error-dynamics-nav-2013

    Also as suggested above try catch can be used as well

  • Community Member Profile Picture
    on at

    Thank you so much. Agree with all of our Suggestions.

    Can't we skip the current record (Order in my case) which is having error?

  • ManishS Profile Picture
    86 on at

    For skipping records you need to check if the order is having any error. If error then mark that records and skip them.

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 NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans