This script works when I step through it with the Script Debugger. The script's purpose is to return to a list view from an individual record view so that the active record is in the middle of the list rather than at the bottom. The script doesn't work if it is run regularly. I cannot figure out why there would be a difference in behavior. Clues would be gratefully received.
Oh, essentially the same script works properly and runs normally when configured for a slightly different purpose. In this case, though, it is running against a view which is already open so no need to switch layouts. Maybe this is a clue?
Thank you very much.