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.

Ui Policy action vs script

Sunny Gurung
Mega Contributor
  1. Which one of the following is true?
  1. A UI Policy’s Scripts execute before the UI Policy’s Actions
  2. A UI Policy’s Actions execute before the UI Policy’s Scripts
  3. A UI Policy’s Actions and Scripts execute at the same time
  4. The execution order for a UI Policy’s Scripts and Actions is determined at runtime
1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

I believe it is A UI Policy’s Scripts execute before the UI Policy’s Actions just like Sanjiv mentioned. I can't find any documentation on this on for example Docs. Though, if you would just test this in a PDI, then you would be able to confirm it is the correct answer.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

7 REPLIES 7

SanjivMeher
Mega Patron
Mega Patron
  1. A UI Policy’s Scripts execute before the UI Policy’s Actions

Please mark this response as correct or helpful if it assisted you with your question.

Mark Roethof
Tera Patron
Tera Patron

Hi there,

I believe it is A UI Policy’s Scripts execute before the UI Policy’s Actions just like Sanjiv mentioned. I can't find any documentation on this on for example Docs. Though, if you would just test this in a PDI, then you would be able to confirm it is the correct answer.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

This is incorrect. 

As per the Scripting in ServiceNow Fundamentals eBook page 157 (Tokyo): "UI Policy Actions execute before UI Policy Scripts"

BiancaK_0-1694285357447.png

 

Allen Andreas
Tera Patron

Yea, I just tested this myself and can confirm that the script portion of a UI policy run before the actions do.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!