System Property Creation

Tanisha26
Tera Contributor

How to link a new property created in servicenow to jobs and scripts?

1 ACCEPTED SOLUTION

Robbie
Kilo Patron
Kilo Patron

Hi @Tanisha26,

 

To reference or call on a system property, use the following syntax: 

 

var property_value = gs.getProperty(‘property_name’);

 

You can use this syntax at any server side script such as Business Rules, UI action, Script Include, and Scheduled jobs etc.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie

View solution in original post

3 REPLIES 3

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

I'm not sure what you mean by linking the property to jobs & scripts.

But, You can call it form scripts using gs.getProperty('<property name>')

 

i also recommend adding details in the description of the property to explain what it is , what it controls and where is it being called from.

-Anurag

Robbie
Kilo Patron
Kilo Patron

Hi @Tanisha26,

 

To reference or call on a system property, use the following syntax: 

 

var property_value = gs.getProperty(‘property_name’);

 

You can use this syntax at any server side script such as Business Rules, UI action, Script Include, and Scheduled jobs etc.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie

swathisarang98
Giga Sage
Giga Sage

Hi @Tanisha26 ,

 

You can refer to below article where System Properties & it's Usage is mentioned clearly,

https://www.servicenow.com/community/developer-articles/system-properties-it-s-usage/ta-p/2300155 

 

Best practices foe\r system property

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0538866 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang