Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Recommendation of using sys_id in Skill Determination Rule

ubhimani
Tera Contributor

While developing the Skill Determination Rule, ServiceNow is suggesting to use the hard coded sys_id of the skill directly in the script. Just wanted to be double sure that whether that was intentionally mentioned because using the sys_id in the script is not been considered as the best practice, and can be come under observation in the Health Scan.

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @ubhimani,

 

While hardcoding the sys_id directly in a script may work functionally, it’s generally not considered a best practice, as it can cause maintenance challenges and may be flagged during a Health Scan.

A more sustainable approach would be to store the sys_id in a system property and reference it in the script. For example:

var skillSysId = gs.getProperty('property_name');

If my response helped, please mark it as the accepted solution so others can benefit as well.

 

View solution in original post

1 REPLY 1

Community Alums
Not applicable

Hi @ubhimani,

 

While hardcoding the sys_id directly in a script may work functionally, it’s generally not considered a best practice, as it can cause maintenance challenges and may be flagged during a Health Scan.

A more sustainable approach would be to store the sys_id in a system property and reference it in the script. For example:

var skillSysId = gs.getProperty('property_name');

If my response helped, please mark it as the accepted solution so others can benefit as well.