Good point, Kevin. I failed to mention that I started with Pre-Validate on the ItemCode, but it didn't recognize any of the GetValue's. Strangely, the results of the GetValues would show up the next line I attempted to enter. I'm assuming it's because of the "pre." And you can only do SetError's on Pre- events, correct? Thanks for the PreTotals loop idea. I had considered that, but right now, the script is leaving the line in a strange state that makes the user think they can still enter data on the line. It looks correct...even lets them choose a different item number and displays quantity, price and extended price correctly, but when you click Totals (or any other tab) and return to Lines, the line is gone. That was my motivation for cleaning up the line and refreshing the grid immediately. But ideally, I'd rather trigger off the ItemCode for sure.
------------------------------
Rob Neal
ServiceWorld Business Solutions
------------------------------
Original Message:
Sent: 10-25-2019 09:22
From: Kevin Moyes
Subject: Refresh Grid Lines After deleting a line
Doesn't Pre-Validate on the ItemCode make more sense? Then you don't need to clean up lines.
If you script within grids, you have to be careful that the lines business object and the UI don't become out of sync.
PreTotals for a loop cleanup is easier... no display issues.
------------------------------
Kevin Moyes
Technical Systems Analyst
Munjal White Consulting Co.
Toronto ON
------------------------------