Sporadic error - xRec becomes blank in form

afarrafarr Member Posts: 287
We are getting a sporadic error in a form. After saving the form in the Object Designer, or deleting the zup file, the problem disappears, but then re-appears a few days or weeks later. The details are below, any help is appreciated.

The client is using a Nav 4.00 database, with 2009 R2 executables (we did a backup in 4.00 and restore in 2009 R2). The problem only started when using 2009 R2, it worked fine before.
They use Navision Server, not SQL.

In the Item Reclass. Jnl (form 393) when going to a new line, an error message is displayed: “Item Jnl. Template ‘’ does not exist.” This is because OnNewRecord has the line:

SetupNewLine(xRec)

And for some reason, xRec becomes blank just before this line is executed.
Alastair Farrugia

Answers

  • BeliasBelias Member Posts: 2,998
    try to download & install the latest build of nav2009r2...i recall there were some issues about the xrec evaluation, but i don't remember if it's only related to the RTC or also to the client.
    there you are a link with the list of HF:
    https://mbs.microsoft.com/Cms/Templates ... RNODEGUID={35196C23-95C8-4245-8F18-19A08BFA6D99}&NRORIGINALURL=/partnersource/support/selfsupport/hottopics/nav2009sp1platformhotfixoverview.htm?printpage=false&stext=980448&NRCACHEHINT=Guest&printpage=false&stext=980448&wa=wsignin1.0
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • afarrafarr Member Posts: 287
    Thanks Belias.
    The error re-occurred just a few hours after the last fix yesterday, so I downloaded the latest build (32519) and installed it on the client's site.

    Of course, since the problem is sporadic, we will never know if it's actually been solved, but if it doesn't occur after a week or two (which it used to do), I'll close the support ticket.
    Alastair Farrugia
  • BeliasBelias Member Posts: 2,998
    ok, let us know how does it ends up, please!
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • afarrafarr Member Posts: 287
    The sporadic error did not re-occur in the last 2 weeks, so we have closed the support ticket.
    I'll change this thread to "Solved".

    Thanks for your help.
    Alastair Farrugia
  • afarrafarr Member Posts: 287
    I learnt (soon after my previous post) that the error was not sporadic after all. It was caused by code that set a filter on the journal. After posting and printing the journal lines, no records existed that satisfied the filter.

    Of course, there should have been another line of code to remove the filter after posting.
    Alastair Farrugia
  • DenSterDenSter Member Posts: 8,305
    What I am wondering about is why this was not caught by debugging the problem.
  • afarrafarr Member Posts: 287
    I wasn't the first or last person to look into this, so I'll have to check and get back to you - it does seem strange that the problem only occurred one a week or less.
    Alastair Farrugia
  • afarrafarr Member Posts: 287
    If the user used “Post & Print”, the form would set a filter on the form, but would not remove it after printing. The filter then caused the error.

    What I was told was that the error occurred randomly, and when it occurred, the debugger showed xRec becoming blank (which then caused the error). In my tests, I posted without printing, which is why I couldn't replicate it.

    Next time, I won’t assume that “random” errors are actually random, and also to check different behaviours (e.g. printing, not just posting), and check what filters are being set.
    Alastair Farrugia
Sign In or Register to comment.