Hi guys.. got a problem. The software architecture is pretty simple: an External WMS writes data in some NAV customs tables and
there's a report (ProcessingOnly) that reads theese records, do some stuff and delete managed record.
We're talking about NAV 2013, product version 7.0.33781.
A Job Queue has been set up and the Job Queue was assigned to the NAS Nav server Instance; the Job Queue calls the Report every 3 minutes.
When the NAS Starts, the Job Queue launch the report and all existing data get processed but after the first run, when the external software writes new data in custom tables, nothing happens... it looks like the report doesn't see any records but if you just open Nav or make a SQL select the records are there. Beside if I open Nav and manually insert a new records , then -as magic - all existing data are processed. If there's no data in custom table and I insert some record by using a Simple Stored Procedure the data are successfully managed by the Report. Moreover if the user manually launch the report all data, ignored by the Job Queue, are processed.
The Job Queue Log Entry shows succesfull entries... no error at all.
if you compare data written by the external WMS with data inserted manually in Nav (as test) they're exactely the same.. there's no difference.
Does anubody has a clue?
Thanks.
0
Answers
My best guess is that it is the server cache that causes this. If there is only one NAV server on the database, it thinks it knows all about the tables it has queried before, and since nobody has added records through NAV, the server believes that the table is empty.
How do you query the table? Do you issue a LOCKTABLE before doing a FINDSET?
Microsoft - Dynamics NAV
I have observed the similar behaviour when adding the data to NAV tables externally (e.g. via SQL). In NAV client - refresh (F5) often helped. In code I believe that SELECTLATESTVERSION function may be of some help in your situation.
As I am not in your situation now, please let us know if the SELECTLATESTVERSION helps?
Otherwise I would agree that it looks like the caching issue. From my perspective it rather seems like the cache update is triggered via some NAV server mechanisms rather then SQL data modifications. Could somebody confirm how the NAV server cache really works?
Regards,
Igor
Let's see if this fix the issue.
I'll let you know.
Thanks a Lot. \:D/
Thanks a Lot.
\:D/
But now I'll take care about the SELECTLATESTVERSION function.
Thanks for sharing it :thumbsup: