Not sure why, but, the second PreInsert is on a separate thread.
It is as if the page gets called again after the inventory lookup is called but it is on a different thread.
THAT is why I can't pin down where the change is occurring - because the second thread does a filetosessionqueue(Orders) and it is pretty random as to when it hits.
I'm pretty sure this isn't my code doing this, but the example seems to work. The example form has only 3 fields and 1 look-up where as my form has 2 lookups, a dropdown that is dependent on the second look-up, 50 fields on 2 tabs.
So while my form is doing its update stuff after the lookup, the extra thread is restarting the form on the same session id depending on the speed of the two threads, the orders buffer gets cleared at varying times.
I'm not sure that the example app would show this behavior if I put my Trace statements in.
Maybe safer to go back to 5... arghhh