How do I create a link in a UI Page that takes me to a specific catalog item?

Shant Cancik
Tera Contributor

1) I created a UI page with a link to a catalog item order page:

<a href="com.glideapp.servicecatalog_cat_item_view.do%3Fsysparm_id%3Db71b6185db8cc3000b3d75131f961903"> click here.</a>

2) I placed this UI page on another catalog item.

3) I click on the link and get taken to a Page Not Found screen.

BUT...

A link autofills on this screen and if I click "Go", it takes me to the catalog item I wanted:

2.png

So weird. I feel like I'm super close. I've tried a bunch of variations of my link in step 1 but can't get this to work properly.

Anyone have an ideas?

1 ACCEPTED SOLUTION

Since the UI Page is inside the frameset you don't need to encode the URL. So change the %3F to ? and %3D to =. You really just need the encoding if you are going to load a page with the nav_to.do?uri= parameter.



EDIT: So the link should be


<a href="com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=b71b6185db8cc3000b3d75131f961903">Click here</a>


View solution in original post

4 REPLIES 4

Dave Smith1
ServiceNow Employee
ServiceNow Employee

UI Policy or UI Page?



It looks like your link needs a preceding "/" since it's webroot-relative.


Hey Dave,



It's a UI page added to a catalog item as a variable. I also tried adding the "/":



<a href="/com.glideapp.servicecatalog_cat_item_view.do%3Fsysparm_id%3Db71b6185db8cc3000b3d75131f961903"> click here.</a>



and am still getting the same result


Since the UI Page is inside the frameset you don't need to encode the URL. So change the %3F to ? and %3D to =. You really just need the encoding if you are going to load a page with the nav_to.do?uri= parameter.



EDIT: So the link should be


<a href="com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=b71b6185db8cc3000b3d75131f961903">Click here</a>


Hi Shahed,


how to create this link dynamically?

Thanks in Advance.