One of the things I always run in to with creating scripts is to create new records in other tables. One way is to leave and come back to the current layout or you have to create a new window and close it at the end of the script.
Normally with leaving the layout and coming back it's no problem. But with a PDF preview in the layout it refreshes it or with a portal with many records and it's halfway it starts back at top. The other way is to open a new window (and style it 'like' a pop-up) but it always turns out ugly especially in Windows solutions.
What is the best way without that the user experiences something like described.