The Zurich release has arrived! Interested in new features and functionalities? Click here for more

g_navigation.openPopup not working on Service Portal

tateroth
Giga Contributor

I am trying to combine over 200 seperate software catalog items into one master form.   The support team uses KACE (so no easy automation) and the software is classified as either Self Installable or not depending on the script they created.  

I created the following Catalog Client Script for the Catalog Item and it works just as expected while in the application.   Once the user selects a software that is u_self_installl (I know, I was having a bad day with the 3 l's) = true they get the alert message and when they click OK they get a popup window to the self installer.   on the Service Portal they still get the alert, but the navigation doesn't happen.   Is there another way to create the popup from the script that would work on the portal?

find_real_file.png

1 ACCEPTED SOLUTION

tateroth
Giga Contributor

Just an update in case anyone else ever needs this information.   I opened a HI ticket and while it's not officially supported,



location.href="url";



works in this situation.   I've tested it and can verify it works in Jakarta's Service Portal.   Thanks everyone for the help!


View solution in original post

13 REPLIES 13

sachin_namjoshi
Kilo Patron
Kilo Patron

Please see the g_navigation API.



https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=c_GlideNavigationV3API



Please use below




  1. g_navigation.openRecord('change_request',sys_id_here);  


Regards,


Sachin


The SN Nerd
Giga Sage
Giga Sage

Your code is fine, I think the problem is that g_navigation is not supported in Service Portal.



Check the debug log in your browser for errors.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Exactly, g_navigation isn't supported by the Service Portal, I'm wondering if there is a different way to open a URL in the browser that is supported by the Service Portal.


Supporting both the fulfiller interface and Service Portal for legacy Catalog Items is very tricky.


There really isn't a one-to-one path from legacy Service Catalog to Service Portal as there are missing gaps in the API as you have discovered.



As a workaround, you could add some help text under the variable with the link to the popup.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022