order

22M61A05D8
Tera Contributor

Hi everyone,

I’m currently trying to get a clear and comprehensive understanding of execution order in ServiceNow — especially how Client Scripts, UI Policies, UI Actions, and Business Rules interact during different stages of form interaction and submission.

To get community insights, I’ve listed a few related questions below. I’d really appreciate detailed explanations or references to official documentation wherever possible.


🔹 General Execution Order Questions

  1. What is the complete client-side execution order for form load events in ServiceNow, specifically for Client Scripts and UI Policies?

  2. Can someone clarify the precise sequence in which onChange Client Scripts and UI Policies are evaluated when a field’s value changes on a form?

  3. I’m trying to understand the full lifecycle of a form submission. What is the execution order from onSubmit Client Scripts through to before and after Business Rules, and where do UI Actions fit into that?

  4. Where do UI Actions (both client-side and server-side scripts) fit into the overall execution order on a form, in relation to Client Scripts and UI Policies?

  5. What happens first on a form: a Client Script, a UI Policy, or the client-side script of a UI Action? Could you explain the conditions under which each would run?


🔹 Scenario-Based Questions

  1. I have an onLoad Client Script that sets a field value, and a UI Policy that hides that field if its value is “XYZ”. Which will execute first, and will the field be hidden correctly?

  2. I’m using an onSubmit Client Script for validation. If that script returns false, will any before Business Rules still run? What about other onSubmit Client Scripts?

  3. If I have a UI Action that has a client-side script to confirm an action, and then calls a server-side script, does that server-side script trigger before and after Business Rules like a standard form submission would?

  4. In a list view with onCellEdit Client Scripts, what is the exact order of operations when a cell is edited and saved, leading up to any before Business Rules

0 REPLIES 0