It even works if you switch to another template, and then back to one with the script.
However, in
9.3 the same thing does not happen. When I switch to the template containing the script, no alert appears.
I thought there may be a problem with the script itself (even though it's just alert("hello"); ), so I changed it so that it triggers on the Default Request instead.
When I log a new incident, the script runs:
And as expected, nothing happens when I change to another template (with no script configured)
But when I go back to Default (where the script should run again)...
So it seems the
On Form Load script only runs the once, and changing templates does not make it run again.
If I create a new Incident by picking the template with the script from Request Catalog menu, it
does work, but not if I change half way through.
This is a problem if the Technician changes their mind halfway through logging the incident, or selected the wrong template to begin with. Also, if they don't pick from the catalog and just click new request, the script will never run when they select the appropriate template
The rule itself:
As it worked in 9.2, I'm a bit confused as to why this doesn't in 9.3
It's frustrating as there were number of bugs with this script not executing when technicians edited the content (see my request 8063371) in 9.2. I was told at the time that there were a number of issues with Field & Form rules in this version, and that 9.3 would definitely fix these issues. It has fixed one problem, but introduced another!