Where is a script include method called?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 06:39 AM
I have a method defined in a Script Include (FWIW, it's in an OOtB include, though I think it's a method we created. A secondary question: is there a way to easily determine that?). I'm trying to figure out where it is used. I tried querying Business Rules (Script field contains method name or Condition field contains method name), Client Scripts (ditto), and Script Includes (Script field contains). The only hit I got from those queries was for the Script Include where it was defined, and I did also confirm that that Include had no calls to that method, only the definition.
Is there another place (perhaps somehow related to templates) where that method might be called? Or another table to search where it might be called?
Thanks,
Dave

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 07:00 AM
Well it will be very difficult to figure that out, few things you can try out to check.
Check if client callable checkbox is marked true, then it must be called from a client script
Else, it can be potentially from any server side script(which I believe you have already checked), also check reference qualifiers and ACL scripts also UI actions condition/script and also Scheduled job.
Most painful place it could ever be placed is workflows, and its very difficult to spot but it could also be there.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 07:07 AM
Hi,
Did you try to do code search?
Using Code Search to make developing on the platform easier
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 09:15 AM
I would like to say that that was very helpful, but for some reason I can't start studio on any of our instances. They ask for a login (even though I'm already logged in), then hang indefinitely while trying to retrieve the list of available applications. Is there a relevant role needed (delegated_developer and teamdev_user are not it)?
Thanks again,
Dave

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 09:42 AM
Hey,
Checkout below support article to be able to enable studio:
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar