What does isVisibleServicePortal do in sn_sc.CatItem?

jonlind
Giga Contributor

I have a simple record producer that seems to be configured identically to all of my other record producers but I cannot use it on the service portal and I get the message "You are either not authorized or record is not valid."

Testing the code I see that the method "isVisibleServicePortal" is returning false.  I am running on an admin account and have tested accessibility: there are no entries in the "Available for" and "Not available for" related lists, it is in the same main service catalog as all of the other catalogs and everything seems to be identical to the other, working producers.

It would be really nice to know what the logic within sn_sc.CatItem's isVisibleServicePortal method.

The code is in the widget "SC Catalog Item":

		var validatedItem = new sn_sc.CatItem('' + data.sys_id);
		if (!validatedItem.canView() || !validatedItem.isVisibleServicePortal()) {
			data.recordFound = false;
		}

Thanks!

1 ACCEPTED SOLUTION

jonlind
Giga Contributor

Well, it's super easy.  There is a field called "hide_sp" that's not on the forms.  This one had the flag checked.  

View solution in original post

5 REPLIES 5

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Ahh that makes sense. Glad you got it working!