CAD practice question 19 of 35

Which one of the following is true?

Full set: 264 questions
Answer options
A: A UI Policy’s Actions execute before the UI Policy’s Scripts Correct answer
B: The execution order for a UI Policy’s Scripts and Actions is determined at runtime
C: A UI Policy’s Scripts execute before the UI Policy’s Actions
D: A UI Policy’s Actions and Scripts execute at the same time
Correct Answer:
A. A UI Policy’s Actions execute before the UI Policy’s Scripts
Explanation

When a UI Policy condition evaluates to true, the platform first applies all associated UI Policy Actions (hide, read-only, mandatory, etc.). After those built-in changes are finished, any UI Policy Script that belongs to the same policy is executed. This ordering lets the script adjust or override results produced by the actions if necessary. Hence, Actions always execute before Scripts.

Why Incorrect

B. Execution order is fixed and documented, not dynamically decided at runtime.
C. Reverses the documented sequence; scripts run after actions, not before.
D. ServiceNow processes actions synchronously, then triggers the script—these steps are not simultaneous.

References

1. ServiceNow Product Documentation, Platform Release Utah: “UI policy scripts execute after all UI policy actions have been processed.” (UI Policies → Create UI policy scripts, paragraph 2).

2. ServiceNow Developer Site, Learning Module “Scripting in ServiceNow – UI Policies”: “When the condition is met, the UI policy applies its actions first, then runs the script.” (Section: How UI Policies Work).

3. ServiceNow Platform Best Practices Guide, “Client-side Scripting” chapter, p. 11: “Actions are processed before the optional onChange function in a UI policy script.”

Scroll to Top