UI policy and Client Script which works

Arun_Manoj
Mega Sage

Hi ,

 

Client script to make a field Mandatory.

Same Created for the UI policy to make field Mandatory.

 

What will be the outcome of this question?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

UI policy runs after client script

Now in your question it won't impact as you are making it mandatory at both the places.

But if you are doing something on the same field in UI policy it takes the preference as it runs the last

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

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

View solution in original post

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Arun_Manoj 

 

My knowledge say UI Policy first run.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

UI policy runs after client script

Now in your question it won't impact as you are making it mandatory at both the places.

But if you are doing something on the same field in UI policy it takes the preference as it runs the last

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

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

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Arun_Manoj 

Client script runs first which makes field mandatory. If UI policy makes on the same field makes it non mandatory, then your field will be non mandatory.

 

adding this detailed article here which clearly explains various scenarios:

https://www.servicenow.com/community/developer-blog/a-race-between-ui-policy-and-client-script/ba-p/...

 

Please mark the answer as helpful and correct if helped.

Kind regards,

Ravi Chandra