Cannot find source code used in script include

TheGraske1
Tera Contributor

Hi everyone,

I'm trying to add a custom filter for "Topic Content" widget, which would be an A-Z seach (e.g. is user clicks on A, it should add a query like title startsWith A).

I've tracked the content retrieval into sn_ex_sp.TopicServiceUtilSNC Script Include and it retrieves the content using this line: 

topicJs.getContent(includeChildTopics, limit, isMobile, excludeItems, contentConfigIds);

and topicJS is this:

var topicJs = new sn_taxonomy.Topic(topicId);

 

I thought this is another script include but I cannot find it under script includes or anywhere else - has anyone know where I might find it?

 

2 REPLIES 2

Ratnakar7
Mega Sage
Mega Sage

Hi @TheGraske1 ,

 

The sn_taxonomy.Topic object and the topicJs.getContent() method are not part of the standard ServiceNow platform. It appears to be a custom implementation specific to your instance or a custom application installed in your instance.

To locate the source code for the sn_taxonomy.Topic object and the topicJs.getContent() method, you can try the following steps:

  1. Navigate to the "Script Includes" module in the ServiceNow application.
  2. In the filter navigator, search for "Script Includes" and click on the "Script Includes" module.
  3. In the "Script Includes" list, look for any script includes related to taxonomy or topics. It might have a similar name like "TopicServiceUtilSNC" or "TopicServiceUtil".
  4. If you find a relevant script include, open it and check if it references the sn_taxonomy.Topic object and the getContent() method.

If you are unable to find the source code in the "Script Includes" module, it's possible that the code is defined in a different location such as a UI script, UI macro, or custom application. In such cases, you may need to search through the application-specific files or consult with the developers or administrators who implemented the custom functionality.

 

Thanks,

Ratnakar

sn_taxonomy.Topic is part of my PDI and OOB ESC that came with it. I also cannot find where this is being sourced from.