How to check list of scripts in which script include is used

Renu9
Tera Contributor

Hi All,

I'm having a script include which is used in many places . I want to make few changes in script include. So, I want to know the list of places in which this script include is used, so it cant be affected. Please let me know how it can be checked?

2 REPLIES 2

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Renu9 ,

 

Just right click from the place where your script include is getting called from. You should be able to see "Find Record Reference" you can click on it & ServiceNow will fetch for u where all the respective script Include is used. 

(Note Not a good practice as it will try to search in every possible table which can have performance issue.)

 

Instead you can create a new Script Include n use it. In this scenario your work will be less as u might need to copy paste most part of the code.

 

Mark my answer helpful & accepted if it helps you resolve your issue.

 

Thanks,

Danish

Sandeep Rajput
Tera Patron
Tera Patron

@Renu9 A script include can be used in many places on server side. Some of the places namely as follows.

1. Business Rules

2. Script Includes

3. Script Actions

4. Email scripts

5. Inbound email actions

6. Workflow 

7. Flow designer

8. Client Script

9. UI Script

10. Client Controller in Widget

11. Server Side Script in Widget

12. Assignment Rules

13. Transform Scripts

14. Fix Scripts

15. etc.

 

You can try to search your script include name in Script field using Script Contains <Script Include> name query 

 

OR 

 

Your best bet would be to install SN Utils (https://chrome.google.com/webstore/detail/sn-utils-tools-for-servic/jgaodbdddndbaijmcljdbglhpdhnjobg...) and use /code command and search with Script Include name to find all the places where the Script include was used.

 

Hope this helps.