
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 01:58 AM
Hi,
I need to redirect the URL to a different page through business rule.
I am using gs.setRedirect(url) by setting up the url.
Once the condition are true, it showing the form using the above parameter but it's redirecting to new url but opening the form in the bottom same page.
Please advise.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 11:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 07:53 AM
Hi Ankur,
Actually i am setting this parameter in display business rule which have other logic.
When all the validation passed, then i need to redirect the page to this specific record with sysid.
I tried with the above parameter but it's not redirecting to that page rather opening that specific records in the bottom of the current page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 08:06 AM
Hi Amit,
So the redirection code is in display BR?
Can you give complete context of what you are trying to achieve?
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
06-28-2020 08:35 AM
Yes, redirection code is written in display BR.
We are validating some mandatory rules by displaying error message in the form if their is any fields which is blank in the child table. If all the rules are passed, we are comparing the flag value and then performing a redirection to the parent table.
Parent form is getting displayed with above method but not as a new URL but in the bottom of the current page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 03:15 AM
Hi Amit,
May I know how you are passing URL?
Are you passing directly as parameter or are you storing in any variable and then passing.
try with below.
gs.setRedirectURL("try to paste your url here directly ");
Thanks,
Pooja M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 07:34 AM
Hi Pooja,
I tried pasting the URL directly in the parameter, still the new page is displayed in the bottom of the current page.