NAV 2013 Job Queue doesn't see existing records

fab_manzellafab_manzella Member Posts: 13
edited 2013-12-20 in NAV Three Tier
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.

Answers

  • BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    Hi Manzella:
    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?
    Bardur Knudsen
    Microsoft - Dynamics NAV
  • ichladilichladil Member Posts: 68
    Hello,

    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
  • fab_manzellafab_manzella Member Posts: 13
    Hi guys.. Thanks for the advice. I've added a SELECTLATESTVERSION on the OnInitReport Trigger.
    Let's see if this fix the issue.
    I'll let you know.
  • fab_manzellafab_manzella Member Posts: 13
    The SELECTLATESTVERSION Function resolved the Issue.
    Thanks a Lot. \:D/
  • fab_manzellafab_manzella Member Posts: 13
    The SELECTLATESTVERSION Function resolved the Issue.
    Thanks a Lot.
    \:D/
  • max_gmax_g Member Posts: 1
    I've got the same problem with same scenario, I've solved it writing code to do a FINDSET / REPEAT / UNTIL on the record variable instead of let the DataItem to do the loop.
    But now I'll take care about the SELECTLATESTVERSION function.
    Thanks for sharing it :thumbsup:
Sign In or Register to comment.