Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Which one will runs first UI Policy action or UI Policy script

Arjun25
Tera Contributor

I believe UI Policy Scripts run first am i right????

28 REPLIES 28

asifnoor
Kilo Patron

Hi Arjun

A UI policy script runs first and if it meets the condition, then UI policy actions will run.

Kindly mark the comment as a correct answer and also helpful if it answers your question.

Inactive_Us2237
Giga Contributor

Hi Arjun , 

 

UI policy script runs first , 

then UI policy action will run .

 

 

Thanks

Abid

Hi, Abid.  I believe this is wrong.  It's counter-intuitive, but I believe that the Script portion of a UI Policy actually runs AFTER the associated UI Policy Actions.

Try setting a field to Mandatory in one, and Not Mandatory in the other, and see what the result is. 

Azim Kazi
Giga Guru

Hello Arjun,

 

firstly UI policy script will run & if condition true, then UI policy actions run.

 

 

 

 

 

Thanks,

Ajim.

Conditions are evaluated first.  Yes, that's right.  But what about the SCRIPT PORTION of the UI Policy?  Does that run Before or After the various Actions associated with the UI Policy?