Maximum Length Of Code Elements

< 1 min read

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 limitCE type
500 linesScript IncludesBusiness Rules
200 linesAll other CE types
Updated on March 21, 2025
Was it helpful ?