why client script gets executed first than UI Policy?

mallikharjunasw
Tera Contributor

why client script gets executed first than UI Policy?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Mallikharjuna,

That is how ServiceNow has defined it to work. Client scripts are executed first when form load because ServiceNow doesn't use any order for their execution.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Hussain Kachwal
Mega Guru

Hello Mallikharjuna,

Request to you follow the below blog:

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

 

Kindly mark as Answered or Helpful, if applicable.

-Hussain K

I could not get the solution why client scripts gets executed first with the link provided.

To answer you in simple term, Client scripts will execute while the form is loading on the browser & UI policies will execute after the form gets load.

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Mallikharjuna,

That is how ServiceNow has defined it to work. Client scripts are executed first when form load because ServiceNow doesn't use any order for their execution.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader