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

Job queue issue

(0) ShareShare
ReportReport
Posted on by 12

I have some periodic issues with the job queue in nav. In nav, I have created "Intrim" table which gets data from a stored procedure From different database. From this table, I have created a Sales order in navision using CU. This Codeunit is inserted as a job queue entry and creates Sales orders every 5 minutes. The Job queue is not created sales order even though the job queue entry is ready and running and there are records in the “Intrim” table. 

If I run this codeunit directly outside the job queue it works and it creates a sales order properly.

Even when store procedure inserts data in intrim table & when I check in intrim table page shows blank records but when I refresh the page data will appear. I guess I need to refresh the table before the job is running.

(But how I refresh the table in codeunit)

Any help is appreciated!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,237 Super User 2025 Season 2 on at
    RE: Job queue issue

    There is no table refresh but you can use commit to complete the transactions.

  • Verified answer
    I Gusti Made Ari Profile Picture
    3,594 on at
    RE: Job queue issue

    On top of your Sales Oder Creation codeunit , put following code .

    SELECTLATESTVERSION

    docs.microsoft.com/.../selectlatestversion-function--database-

  • Suggested answer
    gert@lynge.org Profile Picture
    on at
    RE: Job queue issue

    Hi Pravin.D

    While a SELECTLATESTVERSION early in your pages and codeunits will probably solve it, it is far from the best solution (you will in fact clear the service tiers row cache so you will get a performance hit).

    The best solution would be to refactor your solution so you inject rows in to the Interim table using webservices.

    If webservices is allowed in the NAV version you are running, please consider that solution.

    It will insert the data through the service tier, utilizing its row cache so it will know about the updated data.

    Best regards,

    Gert Lynge

  • Suggested answer
    Olister Rumao Profile Picture
    3,967 on at
    RE: Job queue issue

    Hi Pravin,

    You can use PowerShell and Task Scheduler to run the Codeunit. I have used it personally and most of the issues got resolved for me.

    Refer:

    community.dynamics.com/.../an-alternative-job-scheduler-for-nav

    Let me know if you need any help further.

  • Pravin.D Profile Picture
    12 on at
    RE: Job queue issue

    This works fine.

    Thank a alot :)

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans