Disable clickable / hyperlink on service catalog categories?

cathytyner
Kilo Expert

In our service catalog, most of our categories are NOT clickable hyperlinks. However a few recently added categories ARE clickable hyperlinks. We recently upgraded to Euerka, not sure if this is relevant. (see 1st screenshot)

 

For those few categories that are clickable links, I can click on the category, and then a page loads with details for the service request items within that category (see 2nd screen shot below).

 

1. The issue is that some categories are clickable, and other categories are not clickable. I want them all to be NOT clickable.

 

2. I have a second issue in particular, where an entitlement script is restricting access to a service request item, and when the category for that item is clicked, the error page "the entity name must immediately follow the '&' in the entity reference" is loaded, see 3rd screen shot. This error page loads for those with or without permissions to the form. This causes confusion.

 

The ideal solution: I would like to make it so none of the categories are clickable. Is this possible?

 

Or if that can't be changed, then can I change the error message to indicate that the user is experiencing a permissions issue?

catalog.jpg

Screen Shot 2014-10-01 at 2.10.43 PM.png

Screen Shot 2014-10-01 at 2.16.55 PM.png

Much thanks,

Cathy

1 ACCEPTED SOLUTION

cathytyner
Kilo Expert

Removed the ampersand "&" from the category and it worked as expected, without the error page. Thank you all for your input!


View solution in original post

6 REPLIES 6

shill
Mega Sage

We are actually testing in Eureka and checked our catalog and it is the same way. All but one category are not clickable, and that category was there before the upgrade.


As a test, I removed one of my no clickable categories and added it back and it became clickable.


In looking at our Calgary instance, all my categories are clickable.


Not sure what is controlling this.


Slava Savitsky
Giga Sage

The only way I can think of to make those links not clickable is to hack them using a UI Script which is definitely not a very elegant solution.



As for the error message you are getting, I doubt that it is related to the entitlement script. This type of error usually happens when there is an unescaped ampersand in the Jelly code of a UI Page or UI Macro. Are you aware of any customizations to Service Catalog UI pages or macros in your ServiceNow instance? The structure of the catalog category pages is defined in "com.glideapp.servicecatalog_category_view" UI Page and the macros embedded in it. Can it be the case that any of these records are customized?


Just in case you decide to go for a UI Script, here is the code. Remember to mark the UI Script as Global.



if (location.pathname.indexOf('catalog_home.do') > -1) {


        try {


                  addLateLoadEvent(function() {


                            var lnk = $$('a.category_title_link');


                            for (i = 0; i < lnk.length; i++) {


                                      lnk[i].href = 'javascript:void(0);';


                            }


                  });


        } catch(err) {}


}


Caution!



I have this same problem with a changed behaviour in Eureka and found this script as a potential solution.



In my TEST system I created a UI Script and used the above code - I cut and pasted it in - and ticked the Global flag. As soon as I saved this I could not access SN using a desktop browser (mobile worked but no Admin access to deactivate script).



It needed Service Now via HI to step in and deactivate the script - I have now deleted it. All is back to normal.



Anyone else have issues - or found this to work OK?



Thanks.