- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
