The CreatorCon Call for Content is officially open! Get started here.

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

M Iftikhar
Giga Sage

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.

 

Thanks & Regards,
Muhammad Iftikhar

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

M Iftikhar
Giga Sage

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.

 

Thanks & Regards,
Muhammad Iftikhar

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