
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 09:50 AM
Been trying to get an onSubmit script for a catalog item to work where the user is redirected to the home page after submitting the record. We recently created a record producer for a new table, and the user is defaulted to the standard portal ticket form. We would like to instead redirect the user to our homepage (/sp) and have created an onSubmit client script utilizing the GlideNavigation API class. However, even with the script, the user is still defaulted to the ticket form. I suspect it may have something to do with the Portal or the widget, but I haven't been able to verify.
Here's the code I'm using:
function onSubmit() {
//Redirects the user to the homepage
alert('Thank you for your feedback!');
g_navigation.open('https://#######.service-now.com/sp','_self');
}
Does anyone know of any potential issues here? Has anyone had any luck with onSubmit redirect scripts?
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 10:15 AM
Hi,
Please see solution for redirection on below post.
Helsinki Service Portal - Record Producer Redirect
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 10:15 AM
Hi,
Please see solution for redirection on below post.
Helsinki Service Portal - Record Producer Redirect
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 11:18 AM
Awesome! Modified the widget SC Catalog Item under the "issueMessage" function. Now the item redirects properly to the Portal homepage. Unfortunate that it can't be easily controlled through a client script, but I'm glad to get it working.
if(table == 'xxxxxx') {
if (c.options.auto_redirect == "true") {
$window.location.href = '/sp';
return;
Thanks Sachin!