Client script execution order (Catalog Client Script, Variable set client script, Table Client Script)

Tadz
Tera Guru
Tera Guru

Hi Everyone,

What is the execution order between client script types:

  1. Catalog Client Script
  2. Variable Set Client Script
  3. Table Client Script

My assumption is they are executed in the order above. 

Is there a way to override the order of the execution? I tried using the order field but it didn't work.

Example:

Execute Variable set client script as the last order instead of Table Client script

Thanks,

Tadz

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

UI Policies execute after Client Scripts. If there is conflicting logic between a Client Script and a UI Policy, the UI Policy logic applies.

You can configure UI policy to override behaviour of client script.

 

Client Scripts and UI Policies both execute client-side logic and use the same API. Both are used to manage forms and their fields. When developing an application, how can you decide which client-side script type to use? Use this table to determine which type is best suited to your application's needs:

Criteria Client Script UI Policy
Execute on form load Yes Yes
Execute on form save/submit/update Yes No
Execute on form field value change Yes Yes
Have access to field's old value Yes No
Execute after Client Scripts No Yes
Set field attributes with no scripting No Yes
Require control over order of execution *Yes Yes

 

Regards,

Sachin

Hello Sachin,

I have a similar issue a Tadz.  This does not pertain to UI Policies.  I have a catalog variable set script that sets the requested for onLoad - this varaiable set is used on many catalog items, but for this use case the catalog item is "Other Services".

I have an Interaction form, and I want to order the "Other Services" from the Interaction form using the "Create Request" UI Action button.  The UI Action sets the requested for based on the opened for name in the Interaction.  However, the onLoad variable set client script is overriding and setting the requested for to my name.  

How can I make the UI Action override the variable set client script?

Thank you,

Laurie

 

AJ2025
Tera Contributor

Please forget the UI Policy. We want comparision between client script, catlog client script and variable set script and their execution order. Thanks.