Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Muralidharan BS
Mega Sage

Configure Code Search for better result

 

Code search is a useful feature for finding specific scripts in a large codebase. I recently discovered the code search can be configured to significantly improve the search experience and yield more accurate results.

 

Well, the code search feature we know from the studio is also available here. This is not the best looking page but it does the job.

 

https://instance.service-now.com/sn_codesearch_CodeSearchExampleUse.do

 

The configuration to the code search lies in here. Just create an entry in the related list and include any table and required field from that table to included in the search and pretty much thats it.

 

https://instance.service-now.com/nav_to.do?uri=sn_codesearch_search_group.do?sys_id=9a44f352d7120200...

 

added filter condition as extra field to search for

code search.png

 

Result shows the BR’s matching filter condition field

result.png

 

Thanks,

Murali

Comments
Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

This might speed up expanding the code search:
- 2023-06-19 - Article - Expand Code Search tables

 

Kind regards,
Mark

James Fricker
Mega Sage

How do I use code search to search global tables with Caller Access set to "Caller Restriction"?

I do not have access to disable caller restriction on a global table (maint only)
I do not have access to create a Restricted Caller Access Privilege when the target scope is Global (maint only)

But I get a Cross Scope access error...
Read operation on table 'sn_rtbi_report_template' from scope 'Code Search' was denied. The application 'Global' must declare a Restricted Caller Access privilege. Please contact the application admin to update their access requests.

Version history
Last update:
‎05-21-2024 11:32 AM
Updated by:
Contributors