ServiceNow Things to Know 121: System Properties
Hello Everyone,
gs.getProperty returns the property value as string irrespective of the type of property being accessed. But, if you are in global scope and want to return a property as 'Boolean', you can use GlideProperties.getBoolean() instead. Additionally, there is also a function GlideProperties.getInt() to return the property value as 'int'.
Sample Script :
gs.print(typeof gs.getProperty('glide.invalid_query.returns_no_rows'));
gs.print(typeof GlideProperties.getBoolean('glide.invalid_query.returns_no_rows'));
If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL
Best Regards,
Prashant Kumar (LearnIT)
YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant
Blog LearnIT: https://medium.com/@LearnITbyPrashant
Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/
ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635
https://www.servicenow.com/community/developer-blog/servicenow-things-to-know-121-system-properties/ba-p/2936152