- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 01:36 PM
Hello,
How can I redirect a user back to a particular view after a UI Action is clicked? I want them to land on the same record, but I want their views to change?
This is the UI Action I have:
function closeTicket() {
var dialogWindow = new GlideDialogWindow('incident');
dialogWindow.setTitle("Close Ticket");
dialogWindow.setPreference('sysparm_incident', g_form.getUniqueValue());
dialogWindow.setWidth(850);
dialogWindow.render();
}
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 06:45 AM
I guess you missed the quotes:
var url = 'incident.do?sys_id=' + incident + '&sysparm_view=default';
response.sendRedirect(url);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 06:21 AM
In the UI Page, there are a few lines that handle the redirect
Processing Script:
var url = 'incident.do?sys_id=' + incident; //Incident is already defined in script
response.sendRedirect(url);
I tried the following and it did not seem to work:
var url = 'incident.do?sys_id=' + incident + '&sysparm_view=default';
response.sendRedirect(url);
The purpose of the redirect is to take them from the view that they were currently in, and transition them to a different view