Line / Header Table Strangeness

We’ve noted some strange behavior when creating Purchase Invoices: 1). Line input is made into the Invoice subform, thereby creating an invoice for that particular vendor. If the Invoice screen is closed, and later re-opened to the same vendor, the entry that was made earlier is there, but if the cursor is repositioned so as to remove focus from that line and then returned back to it, the line entry disappears, requiring it to be re-entered. If you examine the Purchase Line/Header tables, only the vendor information remains. 2). Say that several invoices from multiple vendors need to be entered. The clerk enters the information for Vendor1 and uses the record-advance button on the toolbar and enters the invoice information for Vendor2. The clerk then exits the Purchase Invoice form. When the form is brought back up at a later time (perhaps to create additional invoices or to post existing ones) the line entry for Vendor2 is missing - only the vendor information remains in the tables. It’s as if the last line entry was never comitted to the record. This behaviour also occurs if only one invoice was enetered, but the multiple entry scenario happens most often. Also, the behaviour witnessed in item 1 above can be performed on any record at any time, regardles of its position in the table. What can we do to ensure that the entered data remains? We have an internal review process that takes place prior to posting, so the information entered needs to be persistant until ready to post, whenever that may be.

You could possibly have the property delay insert set to yes?

It does not seem to matter how the DELAY INSERT property is set. The line item data occasionally just disappears from the Purchase Header table, leaving only the Vendor Name, document number, etc. It’s critical that all entered data remain in the header table until posted. Any insight into this behaviour is greatly appreciated.

It sure sounds like your lines are not being inserted into the Purchase Header table. The question of course is “Why?” Have you (or your solution center) made any changes to the code in the Purchase Header or Purchase Line tables? Have you ever had trouble with the Headers disappearing— or just the lines? ------- Tim Horrigan

Although we have added an additional column to both the Purchase Header and Purchase Line tables, I don’t think any code has been modified. Clerks tell me that this behaviour was observed from the time Navision was first installed, long before we made any changes to the tables. When you refer to Headers, I assume you’re refering to the Vendor information associated with a newly created invoice. This information has not dissappered - only the line items entered on the Purchase Invoice Subform portion of the Purchase Invoice form. In other words, when this behaviour occurs, the only information remaining in the Purchase Header table is the vendor information – the amount, department, and other info entered on the subform has been nulled out (blank for text data, 0.0 for amounts, etc.). Using the debugger to identify the line(s) where the “disappearing act” occurs has not revealed anything. I’m at a loss. Could the problem be with the code behind the Purch. Invoice Subform itself?

The problem could be in any of the following objects: Forms 50,54, Tables 38,39. It could even be one of the many codeunits which are being called from Table 39. Your statement >I don’t think any code has been modified. < doesn’t sound very persuasive. And I guess you don’t trust this statement either. If it’s only a matter of two fields being added to the tables/forms, I recommend to re-import the original objects (which definitely DO WORK PROPERLY) and reprogram these two fields. Let’s face it: Someone messed up the code and doesn’t (want to) remember. Marcus Marcus Fabian phone: +41 79 4397872

As it turns out, the S/P had added code to the Purchase Invoice subform when the system was installed, which is why everyone said “it’s always done that” when asked. One line - VALIDATE(Type) - was causing the problem. Because we always use the same default entry for the TYPE field, and because no code exists in any of the TYPE tablebox triggers (including OnValidate), this line was of no consequence and was removed. No more vanishing Header table data! Thanks to all who responded.