Redirect from catalog item?

Dan Hinrichs
Kilo Guru

Hello- I am trying to create a redirect from a catalog item to a SharePoint community by using a JavaScript confirm box that runs inside a client script.   The user would select a specific option from a drop-down list that would trigger the pop-up and, upon clicking OK, would be redirected to SharePoint.

I get the pop-up to appear, but when I click OK to redirect nothing happens.   Interestingly, if I set the redirect to go to a different ServiceNow catalog item the redirect works.   Seems like putting a URL that begins with "http://" inside window.location.href doesn't work, but "window.location.href='com.glideapp.servicecatalog_cat_item_view.do?...." does.

Any idea how to accomplish the redirect to a site outside ServiceNow?

Thanks!

2 REPLIES 2

davidself3
Tera Contributor

Dan,



Have you tried making a ui page that has the URL you want in it? Have the pop-up redirect to the ui page which will automatically load your URL.



I've attached a picture of the PDF (you can't attach pdf's for some reason) I made explaining how to make ui pages that can make catalog items accessible to the public. In section 4.B I explain how you can simply redirect. Try putting your sharepoint URL in instead of the record producer. Here's the paste..



Dave_redirect i. HTML: 1. <?xml version="1.0" encoding="utf-8" ?> 2. <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> 3. ${gs.getMessage("Loading")}... 4. </j:jelly> ii. Client Script: 1. location.href = "/com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=da7e60bcbc2fd500069f5 5ca66f7d2ec"; 2. This sys_id is the sys_id of my record producer "daves incident." ^^



asdf.jpg


tac11tac
Kilo Contributor

This may be a simple answer from a nube, however, when I encountered this, I just needed to ensure that I specified to open a new window/tab.   If it stayed in the frame, then it would not open.   <a href="http://www.service-now.com/" target="_blank">Visit ServiceNow!</a>