client-scripts
Installation
SKILL.md
Client Script Patterns for ServiceNow
Client Scripts run in the user's browser and control form behavior. Unlike server-side scripts, client scripts can use modern JavaScript (ES6+) in modern browsers.
Client Script Types
| Type | When it Runs | Use Case |
|---|---|---|
| onLoad | Form loads | Set defaults, hide/show fields, initial setup |
| onChange | Field value changes | React to user input, cascading updates |
| onSubmit | Form submitted | Validation before save |
| onCellEdit | List cell edited | Validate inline edits |