Skip to main content

Notifications

Microsoft Dynamics NAV forum
Answered

Job queue issue

Posted on by 10

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!

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

    This works fine.

    Thank a alot :)

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 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.

  • Suggested answer
    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

  • Verified answer
    I Gusti Made Ari Profile Picture
    I Gusti Made Ari 3,590 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
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: Job queue issue

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

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans