Specify order of Client Script execution

nicolemccray
Tera Expert

I have 2 onSubmit clients scripts, but they are running out of order (making pop up alerts display out of order).   How do I specify which should run first?

1 ACCEPTED SOLUTION

Slava Savitsky
Giga Sage

Why do you need two onSubmit client scripts in the first place? I would recommend merging them into one.


View solution in original post

9 REPLIES 9

balaji_charapal
Kilo Guru

Which version of servicenow you are using?


Starting for Helsinki you have option to set order of execution for client scripts also, if it is not available on the form, right click on the client script form --> configure form layout -- > move Order to available list.


find_real_file.png


I've specified the order, but #3 is still running before #1:



find_real_file.png


According to the product documentation, there is no way to control execution order of client scripts.


No we can control the execution of client script with "order" filed.


Please try once.