IT CanvassTalk to an advisor
Administration · LessonBy , ServiceNow Architect · Published · ServiceNow · all levels

System properties

What system properties are, how to create and read them safely, and the properties every administrator should know before an upgrade.

Quick answer

What system properties are, how to create and read them safely, and the properties every administrator should know before an upgrade.

Key takeaways
  • Read properties with gs.getProperty so caching applies
  • Namespace custom properties with a prefix you own
  • Properties move in update sets, values do not always move between instances
  • Never store credentials in a property, use credentials or connection records

What a property is

A system property (sys_properties) is a name and value pair the platform reads at runtime. Properties drive behaviour that would otherwise need code changes, for example how many rows a list shows or whether an integration runs in debug mode.

Reading properties in script

Always read through the API rather than querying the table, so you get caching and type conversion.

var rows = gs.getProperty('glide.ui.per_page', '20');
var debug = gs.getProperty('x_acme.integration.debug', 'false') === 'true';

Creating your own

Namespace custom properties with your scope or company prefix so they sort together and survive upgrades.

  • Use a suffix that states the type, for example .enabled, .url, .timeout_ms
  • Set a sensible default in the property description, not just in your head
  • Give the property a Choices list when the value must be one of a few options

Properties worth knowing

These come up in most projects: glide.ui.per_page for list size, glide.email.smtp.active for outbound mail, glide.ui.session_timeout for session length, glide.script.block.client.globals for client script globals, and glide.sys.date_format for date rendering.

Practice challenge

+0 XPStreak ×0
Question 1 of 2
Which call returns a property with a default?

Frequently asked questions

Do property values move with an update set?
The property record moves, and its value moves with it. That is exactly why environment specific values such as endpoints belong in a property you deliberately reset after each promotion, or in a connection and credential alias.
Where do I find the properties for one application?
Most applications ship a properties page under their own menu. Behind it is a sys_properties_category record grouping the properties.
Already working on ServiceNow and stuck on a live ticket?Get an expert ServiceNow developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support