Hi all,
I am getting some bizarre behaviour from the Purchase Invoice document. Here's what's happening:
Say I have 2 Purchase Invoices, and I want to create a third. I press F3, and get a new record. I press TAB to automatically get a new document number.
1) Now, if I try to scroll backward to retrieve the previous record by clicking the Previous button on the toolbar, it works well.
2) Now, what if I want to get retrieve the first purchase invoice in my list (remember, I originally had 2, now I have 3) ? Obviously, again I click the Previous button. However, nothing happens! What do I do?
3) I try something else: I click the First button on the toolbar, and lo and behold it takes me to the first record. Now, I want to go back to my SECOND record (the one I was just one before clicking First). Instead of taking me to the desired record, it takes me to a new record (named 'untitled').
4) I click Previous, and it takes me to the THIRD record, which is normal.
5) Now, I click Previous again, and it doesn't work! It does nothing, and it stays on the THIRD record.
6) Clicking First takes me to the FIRST record in my list, however now the only way to access that lost SECOND record is by choosing it from F5.
I put breakpoints everywhere on the form, and I realized that when I click the Previous button in Step 5, NOTHING IS FIRED. It's like an unattached event.
Something is screwy here, as all other cards and documents can be navigated with these buttons just fine, except for the Purchase Invoices.
Can anyone shed some light into this situation? I can provide more help if needed.
Thanks in advance.
0
Comments
-Check if the numbers of the document are in the order you expect (launch the table to see the exact order without interference of something on the form).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
- The documents use the primary key that was used by default with CRONUS, so I guess it's safe to say that it hasn't changed.
- The document #s are as expected, meaning they are always getting larger.
It happens that SQL-buffering goes crazy. In this case if you open the table in design and close it without saving, the problem is fixed. (you can also logout and login)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Just to let you know, this is not a virgin database. This is a customized database.
There was commented code in the OnNextRecord() trigger, and ironically, I had to remove it for the trigger to fire off properly. So, does this trigger behave similarly to the OnLookup? In the sense that once there is ANY code in it (commented or otherwise), it will disable a default functionality?
Yes, if there is something (empty line, local variable etc.) the trigger is overriden with this user defined one and standard code is not called.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.