Service Catalog item link question

etabalon
Mega Expert

Good day to all!

I'm trying to find the code where is this being constructed. When I try to click a request item in the service catalog and do a right click and copy the link, it gives me this:

"https://companyx.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=65464ec22bc..."

sc_cat.png

Any help will be appreciated.

Thanks,

Enrique

3 REPLIES 3

GRGisMe
Mega Expert

From what I can tell, those URLs are mostly generated in the Java function (hidden from our view) called GlideappCatalogURLGenerator.



There's a handful of places in the system that reference the base part of the URL you're talking about, but none of them appear to be doing exactly what you're talking about.



A quick search in my instance shows that the below scripts are at least slightly related.



Screen Shot 2014-10-09 at 1.25.30 PM.png


Thanks Garrett for this info. That's what I thought that ServiceNow is not going to expose that for us to change. Reason I asked because we are building our CMS and we want to know how an iFramed catalog category versus iFramed catalog item behaves.



Anyway, thank you again!



I appreciate it.



Enrique


Janel2
Mega Expert

I was just trying to do something similar.   The page it goes to is the UI Page com.glideapp.servicecatalog_category_view.


If you want to change the page where the renderer directs links, you'll need to edit the renderer macro to point to the new page.   I have had success with the simply editing the the jvar_link_url variable at the top of the renderer macro "sc_catalog_homepage_category_item".



<g:evaluate var="jvar_link_url">


var jvar_link_url = "com.glideapp.servicecatalog_category_view_software.do?sysparm_parent=";


jvar_link_url;


</g:evaluate>




The other renderer macros are a bigger pain to edit since they're buried in code like this;


var jvar_link_url = GlideappCatalogURLGenerator.getHomepageCatalogLink("${jvar_catalog.getID()}", "${jvar_catalog_view}");


I haven't been able to track down where or how ${jvar_catalog_view} and all the other jelly stuff is really working (not exactly my strong suit).