Which method is used to retrieve a system property?

Prepare effectively for the ServiceNow CAD certification. Study with detailed questions and explanations. Enhance your skills and knowledge for success in your exam!

Multiple Choice

Which method is used to retrieve a system property?

Explanation:
Retrieving system properties in ServiceNow is done through the GlideSystem object. The getProperty method on this object reads a named property from the sys_properties table and returns its value as a string. This is the standard, platform-specific API for accessing configuration values in server-side scripts. Using gs.getProperty('property.name') directly fetches the desired property. The other options aren’t part of the ServiceNow server-side API: System.getProperty resembles a Java method and isn’t available in this JavaScript environment, getProperty() without an object lacks the context to fetch a specific property, and Property.getSystem isn’t a ServiceNow API method.

Retrieving system properties in ServiceNow is done through the GlideSystem object. The getProperty method on this object reads a named property from the sys_properties table and returns its value as a string. This is the standard, platform-specific API for accessing configuration values in server-side scripts. Using gs.getProperty('property.name') directly fetches the desired property.

The other options aren’t part of the ServiceNow server-side API: System.getProperty resembles a Java method and isn’t available in this JavaScript environment, getProperty() without an object lacks the context to fetch a specific property, and Property.getSystem isn’t a ServiceNow API method.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy