Now that the run scripts from url is activated. I get cannot find script or it has been deleted. A search on community confirmed that triggers will do that to run from urls...
I was pretty certain that in the past, I successfully used a FMP URL to trigger a script in a file that had an OnFirstWindowOpen script handler. To be fair, in most cases that I have used the FMP URL to trigger a script, the target file was already open, and thus the OFWO trigger probably did not come into play. But, I do seem to recall that I had one use case where I actually needed the OFWO script trigger to run, and it did so without issue.
Wondering if you could please share a link to the Community page that describes the issue, so that I can familiarize myself with what it says?
Also, wondering if you were able to confirm that the script trigger is the issue in the solution that you are working with (presumably by temporarily disabling the first-window trigger to confirm that it works when the script trigger is disabled)?
I did try to disable the OFWO but it still gave me the error. I looked with Show Window and can see that 3 files are also open though hidden when that file opens. Given that the solution has a whole lot of files and given the complexity, I pretty much have given up on using this method.
Moreover the FM URL method poses security risks. Especially because the account name and pwd are sent in clear. I was going through a very convoluted method to set a temporary pwd for the full access account and resetting it after the process. I was only using this method because I though it wasn't possible to open a file using a variable.
In the end I am using the Perform Script because I just learned that contrary to my holes-ridden understanding of FileMaker, it is possible to set the file to open using a variable. I thought I was limited to hard coded file names. I had not realized that I could set a FilePath which is a $$variable by setting it through "Manage Data Sources" at the bottom of the file list choices that pop up when you try to select the file to open.