Hi Everyone and script experts.
We are helping a customer who wrote their own script, to enable/disable/hide certain controls in Sales Order. The script works fine when run in Sales Order Entry, and also works fine the first time the customer opens up a sales order from the orders tab of customer maintenance. The error comes up after they close the sales order, and go to open another order for the customer (from the orders tab)
Script is being run against the sales order header table. Version 2020 Advanced.
Any insight on why the script would work fine in SO entry, and the first time from Customer maintenance, but pop the error 88 on the 2nd order from customer maintenance would be greatly appreciated - thank you.
The error is:


and the script: (there is more of the same type of logic in the script, but this is the "top" of the script, which is where things fail the 2nd time)

------------------------------
Jeff Fiddelman
Exeplex, LLC
------------------------------