UI page redirect to previous list view

Still Learning
Kilo Sage

I have a requirement to create a UI action that will mass update multiple records from a list view (My Groups Work). I have the UI page, and the UI list action created, but cannot figure out how to redirect back to the 'My Groups Work' lists view where the conditions are preset.  I can link to the task list, but I really need to get to the full filtered list.  My current redirect script is below: 

 

var urlOnStack =  GlideSession.get().getStack().bottom();
response.sendRedirect('task_list.do');

 

 

4 REPLIES 4

Mike_R
Kilo Patron
Kilo Patron

To redirect to previous page try:

window.location=history.back()

Hello @Mike_R 

Thank you so much for your reply. I apologize (in advance) for the question ... I'm still pretty new to developing and writing code.  Should the script look as follows:

var urlOnStack = GlideSession.get().getStack().bottom();
response.sendRedirect('window.location=history.back');

or should I leave out the last line in the above script and on the UI action add a line that looks like this:

action.setRedirectURL(window.location=history.back);

Please advise. 

I just re-read your initial post and I think I got a little confused. You mentioned a UI page and UI action. Is that accurate or did you just mean the list view of records and a list UI action?

Yes. I have a UI action that pulls a UI page (GlideDialogWindow) that will populate fields the forms that are selected in the list view.  When the ui page is saved then it should redirect to the same list view (My Groups View) but instead it goes to the full list of task records and not the filtered list.  It's this part that I need help with.