Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

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!

*This post is locked for comments

  • 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,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
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans