What happens when two client scripts have the same Order value?

Shreneek
Tera Contributor

I know its not the good practices but what if  
If I have two client scripts on the same table with the same Order value (e.g., both set to 10), which one executes first?  

Creation date?

Alphabetical order?

Random ?

 

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron

It would be Random, hard to predict or find a set pattern.

-Anurag

View solution in original post

4 REPLIES 4

Anurag Tripathi
Mega Patron

It would be Random, hard to predict or find a set pattern.

-Anurag

yashkamde
Tera Guru

-> Type determines the phase of execution : (onLoad → onChange → onSubmit).

-> Order determines sequence within the same type.

In your Case, If two scripts of the same type have the same order, execution is not guaranteed which runs first, it’s essentially nondeterministic.

If my response helped mark as helpful and accept the solution..

 

 

Shreneek
Tera Contributor

Thanks @Anurag Tripathi 

 

Its_Azar
Kilo Sage

Yup its 100 percent random, and i too think there is no reasoning behind it @Shreneek .

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG