Different script types
ServiceNow offers various scripting options to the developer. While all scripts in ServiceNow are written using JavaScript and invoke relevant API calls, each script type offers a different functionality. The following are the key script types available in the ServiceNow platform, which we are going to cover in this book:
- Business rules: These are similar to database triggers and can be used to customize system behavior. They execute on the server side and run when a database action such as query, insert, update, or delete occurs. They can also be used to abort a database action. For example, business rules can be used as a server-side form validation wherein an insert or update database action can be aborted if the form validation fails.
- Script actions: These are a set of scripts that are executed whenever an event occurs. They have a condition field which, when set, must be true for the script to run. They can also be invoked by firing events from a workflow. Like...