- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 03:29 AM
Hi,
I am trying trying to create a related link within a change record that will either open a catalog item within the change record, or open a new tab direct to the service portal for the user to submit the request. Preference on having this open within the form and the UI action being a related link.
Any assistance will be appreciated! I am assuming a script will need to be created using the g_navigation.open command
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 03:40 AM
Hi,
make the UI action as Client side
function openLink(){
// for portal
var portalUrl = '/sp?id=sc_cat_item&sys_id=' + 'catItemSysId';
// for native
var nativeUrl = '/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=' + 'catItemSysId'; //
g_navigation.open(portalUrl, '_blank'); // new tab use _self for same tab
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 03:40 AM
Hi,
make the UI action as Client side
function openLink(){
// for portal
var portalUrl = '/sp?id=sc_cat_item&sys_id=' + 'catItemSysId';
// for native
var nativeUrl = '/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=' + 'catItemSysId'; //
g_navigation.open(portalUrl, '_blank'); // new tab use _self for same tab
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 04:11 AM
Thank you Ankar, this has worked!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 11:50 AM
Hey,
How do you create this using a Form Button? Not a link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 01:53 PM
Here's my code - UI Action button on Interaction table
} else if {current.category == "Complaint") {
var portalUrl = '/sp?id=sc_cat_item&sys_id=' + '47c185ab1b432d50b49374ce0a4bcb67';
g_navigation.open(portalUrl, '_blank');