- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 04:58 AM
Hello,
I try to redirect from backend to portal in the same page by using:
window.location.href = 'url';
and I get redirected like this:
Is there a way to redirect it without backend navigator and etc? It has to be the same tab
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 06:16 AM
Hmm, I think I misunderstood, so you just want the whole page to reload to the portal without the nav bar?
Try this:
window.top.location.href = url
The key difference here is that we are now reloading the TOP frame as opposed to just the gsft frame.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 05:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 05:42 AM
I am trying to redirect from backend UI action to Portal page
Yes, the issue is it is including navigator and also upper line of the backend
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 05:56 AM
Hi there,
To load just the main frame without the nav_to refreshing:
var frame = top.document.getElementById('gsft_main'); // we will only reload the main frame
frame.src = 'YOUR_INSTANCE_NAME.service-now.com/srcm?id=form_tabbed_contract&table=ast_contract&sys_id=' + g_form.getUniqueValue();
// redirect frame without the need to refresh nav_to. Give this the full URL of the page you want to redirect to (not including the nav_to)
Try that, hopefully it helps 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 06:11 AM
Thanks for your help :), but unfortunately, I get the same result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 06:16 AM
Hmm, I think I misunderstood, so you just want the whole page to reload to the portal without the nav bar?
Try this:
window.top.location.href = url
The key difference here is that we are now reloading the TOP frame as opposed to just the gsft frame.