AnsweredAssumed Answered

need to close window in server script?

Question asked by njem on Mar 12, 2017
Latest reply on Mar 13, 2017 by njem

I need to understand windows in server scripts better. Had a long frustrating tracking down of a local script complaining "can't modify, open in another window". Found that if that rec was the last one modified by a server script, and since I didn't have the commit step, the record was still open. Silly me, I'd figured once the server script was done the record would be released, committed and released. Nope. It stays continuously open in some virtual server space. Okay, so I'll put commit at the end of any server script but still want to understand. I see that Open/Close Window are legit server steps. Huh? I'd just been doing Go To Layout, assuming the server script space had a virtual first window (just like when you open a file locally) and that when the script was done that virtual window and all connection to the file would close. Since without a commit, the record stayed locked, that makes me wonder, even if I commit is there still a virtual window open? Should a server script have Open and Close Widow steps? Or just a Close Window at the end to close the first default virtual window? Or maybe a Close File? And are there gotchas if a script created for local use (which may or may not have Window steps) if that script is called to run from the server? Confused.