Which rule execute first client Scripts or UI polices?

ram2497
Tera Contributor

Which rule execute first client Scripts  or  UI  polices?

1 ACCEPTED SOLUTION

haseena ayesha
Kilo Guru

Hi

Ram2497

 

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

Client-based code:

"Client-based code that executes in the browser, using Ajax or running as Javascript, always executes before the form submission to the server."

This includes Client scripts and UI Policies.

First onLoad Client scripts, after that the first UI Policies kick in.

After that, the Client scripts and UI Policies that work onChange.

After that, the Client scripts that work onSubmit.

Refer the below link may helpful  you.

https://community.servicenow.com/community?id=community_blog&sys_id=512d26e5dbd0dbc01dcaf3231f9619ce

https://developer.servicenow.com/app.do#!/training/article/app_store_learnv2_scripting_jakarta_clien...

 

 

Thanks & Regards

Haseena

                                         

                                                             PS: Hit like, Helpful or Correct depending on the impact of the response  

                                         

View solution in original post

5 REPLIES 5

KS86
Tera Contributor

Hi folks,

'If there is conflicting logic between a Client Script and a UI Policy, the UI Policy logic applies.'

 

Can anyone explain this line with example?