System Property

sam352120
Kilo Guru

Hi All,

Under what scenario a system property can be used in a script.

Any practical example regarding this is a welcome one.

Thanks in Advance,

Sambit Rath

1 ACCEPTED SOLUTION

Hi Sambit,



Can you please mark this thread if your question is answered.


View solution in original post

7 REPLIES 7

venkat2
Kilo Expert

Hi



The system properties can be used in a script when required to process a static value captured in the property. The property value can be modified as per the requirement and the script doesnt require any modification.



Best example is with the autoclose of incidents.



glide.ui.autoclose.time



Business rule: incident autoclose



var ps = gs.getProperty('glide.ui.autoclose.time');



The generic use of system property as suggested by Service Now is to capture the sysId values of the required records and use them in the scripts.


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Sambit,



So if you have properties page as part of your application,   you can give your admin an access where he might have to just change the value in the property as per the requirement.


Technically your script will look for the property value which can be dynamic. Please refer section 3.8 on how to get property value in the script.


http://wiki.servicenow.com/?title=GlideSystem#gsc.tab=0



I hope this helps


sam352120
Kilo Guru

Thanks Guys for your valuable input.


Can you let me know how the system   property can be called ???



Thanks,


Smabit


Please refer section 3.8 on how to get property value in the script.


http://wiki.servicenow.com/?title=GlideSystem#gsc.tab=0