gs.setRedirect() not working in after BR

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2019 12:08 PM
I was trying to redirect a user to some other form after update in incident form.
I wrote an after BR in the incident table and added gs.setRedirect('/change_request.do?sys_id='+some_sys_id);
It updated the record but didn't redirect the user.
Also tried to write the same code in Script Include and call it in the BR but no luck.
Could anyone help me with this?
Thanks in Advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2019 02:08 PM
I think you need to use action.setRedirectURL(('/change_request.do?sys_id='+some_sys_id);
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2019 06:18 PM
There could be another Business Rule that runs after that is redirecting the user to a different page.
Check other business rules with a higher order for this.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022