I'm wanting to create a script that duplicates related records, then assigns a new name based on the contents of a global field. I'd like the script to perform this task without leaving the current layout.
I've created the attached script, it works without any issues when using a local copy of the database, however, when it's hosted on a server it opens the related layout during the scripts' execution. I would like to stay within the current file at all times.
Any help would be much appreciated!!