Maximum length of code elements

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 Includes
  • Business Rules
200 linesAll other CE types