To script, or not to script?
Once you learn how powerful scripting can be in ServiceNow, it would be easy to try and do everything with custom scripts. However, this is quite often not the best solution for a few reasons:
- If the functionality or API are updated or deprecated, any unnecessary custom code means more maintenance costs during upgrades
- Increased custom code increases complexity, increasing the cost of development overall
- Custom code being used in lieu of out-of-box functionality can make it more difficult to identify the source of a given behavior, making troubleshooting cumbersome
In the Where scripting is supported section of this chapter, we'll learn about the various fields and records in which scripting is supported. However, it is important to keep in mind that custom scripts do carry a small cost to offset their benefit, in terms of performance, upgradeability, and future stability.
With that said, the benefits of a custom script are very often far greater than the costs; primarily...