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 works fine.
Thank a alot :)
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.
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
On top of your Sales Oder Creation codeunit , put following code .
SELECTLATESTVERSION
docs.microsoft.com/.../selectlatestversion-function--database-
There is no table refresh but you can use commit to complete the transactions.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148