Make sure you are not adding too much functionality per each configuration element (CE) by not exceeding the maximum number of lines of code.
In general, code that runs on the server side and re-usable libraries can reasonably be expected to be longer than client-side code, which should be kept to the mimum.
The following are, in our experience, reasonable limits to apply for a ServiceNow instance. You can customise these settings for your particular instance.
Code line limit | CE type |
---|---|
500 lines | Script IncludesBusiness Rules |
200 lines | All other CE types |