Scripting to find the hard coded sys_id

Abc 26
Tera Expert

Hi Team,

I wanted to find all the script and places where ever sys_id is hardcoded in script.

Reason : 
After finding i wish to place it thorough the system properties.

 

Please help through scripting how can i find where ever sys_id i hardcoded.

 

Regards

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

check these links

Is there a way to find all the scripts where sysIDs are hardcoded

how to identify any sysid in script include table using instance scan

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Duplicate post: https://community.servicenow.com/community?id=community_question&sys_id=1b5be3d7dbbc551039445ac2ca96...


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

@Allen Andreas : Thanks for bringing up as i am new to servicenow so i was unable to find the earlier post. So i deleted the duplicate one now.

SaschaWildgrube
ServiceNow Employee
ServiceNow Employee

The CodeSanity app contains a set of Instance Scan checks aimed at improving source code and application quality. Developers should run them before shipping a new application version.

Identifying hard-coded sys_ids is one of them.

Vote to make it part of the platform OOTB!

https://community.servicenow.com/community?id=view_idea&sysparm_idea_id=23716958db25d514904fa9fb1396...

Or install it right away:

https://www.wildgrube.com/servicenow-codesanity