The CreatorCon Call for Content is officially open! Get started here.

UI action script to back to list of records

maneesh3
Tera Contributor

UI action script when click on "Back" button, it should redirect to table's list of records.

Any suggestions please...

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Use this line to redirect to the list


var url=current.getTableName()+'_list.do';


action.setRedirectURL(url);


View solution in original post

4 REPLIES 4

Chuck Tomasi
Tera Patron

The UI actions have a statement you can include



action.setRedirectURL() where you can put a record (e.g. current) or a URL to bring it to a predetermined destination. It does not control the behavior of the back button.



http://wiki.servicenow.com/index.php?title=UI_Actions


Thanks for the help.


Abhinay Erra
Giga Sage

Use this line to redirect to the list


var url=current.getTableName()+'_list.do';


action.setRedirectURL(url);


randrews
Tera Guru

there is a return url parameter you can set.. the same as a redirect url.. this controls where the back button should take y ou