Server-side scripting is generally preferred to client-side scripting, so it should be used where possible. As server-side script tends to run away from the user frontend, it is less likely to affect loading times that a user would see as a poor user experience.
That said, it is still advisable to configure before customizing and avoid scripting at all, wherever possible. This is because script is harder to maintain and is more likely to cause issues between releases of ServiceNow.
Let's explore some common uses for server-side scripting and how to best achieve these tasks.
Changing form values is usually best achieved by a business rule or UI action. If you want to change values when a user makes a click, then a UI action is best; however, if you simply want the values to change at all times when certain conditions are met, then a business rule is better. It is best to use a before business rule so that the form is only updated...