Hi all,
in last few months some of our subsidiaries using NAV 5.0 facing strange problem during "Purchase Order" posting.
After Order is posted sometime pops-up error message that "The Purchase Header does not exist" referring to the Order just posted.
It happens once in 8-10 orders without any rule in it.
Posting is correct, it is first annoying, but after couple of error message colleague making postings have to restart client, because NAV Client hangs.
I have even try to "finish" Codeunit 90 process using Debugger starting after line with DELETE. Best I can get is to come to "Purchase Order" Form - OnFindRecord from where pops-up error message and that's it.
Setting Debugger active helped neither.
Also, strange thing in "Purchase Order" Form is that sometime after entering some data, somewhere in Form, some fields are stay blue (as selected), cursor is not visible anymore and is very hard to follow which field is active. Going to field with the mouse helps, but still is cursor not visible. What could then happen, is that posting is done, new Purchase Order is shown - problem is gone. ](*,)
I've spent lot of time doing Google and I couldn't find anything similar in NAV 5.0. Similar problem is mentioned in Navision 3.60 and solved with one BugFix.
What to do?
0
Comments
I have seen something similar to this in sales and the issues related to some filters set whilst printing. Sorry I can't remember the details but if its it post and print, take a look at how the report is called. It might relate to the printer selection code especially if you are running on Citrix.
Colleagues where I have tested have DocuWare and they don't print.
We are using a template at our subs and I've asked other about this error. Three more subs have the same problem, eight don't have the problem. Same object stand. :shock:
In the process of posting complete invoice,it will delete the document .
check whether there is a customization after that,..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
- The document does not exist (this is the document you just posted and which no longer exists)
- Do you want to rename the record?
- The document does not exist (same doc as in 1)
The source of the problem is global variables in the subform which after posting still contain the old record in combination with a bug in NAV.
It usually happens when forms are in fullscreen and when the cursor is in the lines when posting starts. It never happens when the cursor is in the header and usually does not happen when the forms are not in fullscreen but you cannot be sure of the latter. The error is not coming from the posting CU but happens when the form is refreshed (actually the subform).
It works like this (when posting the cursor is in the lines):
The Error does not occur if the cursor is in the header when posting.
The first line of code executed in the subform is
"Type := xRec.Type;" in OnNewRecord. You could think that Rec in the lines is not correctly updated but this is not true.
Actually someone added a global var "PurchHeader" to the subform (which is not even used in the OnNewRecord Trigger) and that var still points to the old record (A). For whatever reason this is enough for NAV to throw the error (if the cursor was in the subform when posting).
How to fix it:
Easy, just delete one by one the global vars from the subform and compile. Replace all occurences with local vars. Only if this is not possible leave them as global. For most of them it is and the developer was just too lacy to use local vars instead of globals.
/Frank
FD Consulting