Is it possible to redirect to a URL from a list view context UI action?

Shane Vidal-Hal
Kilo Contributor

Hi

I have found examples of list context UI actions that redirect to a URL but all are designed to be used from a form view and the context ui action is run from a related list record. However when I try to run a action.setRedirectURL(url) from an ordinary list view record directly, nothing happens. Is there a way to do this?

Many thanks

Shane

3 REPLIES 3

Abhijeet Upadhy
Tera Expert

Hello shanevidal-hall

 

Use UI Context Menu for your requirement or while creating list UI Action add "sysverb_" before the name you give to it.

 

Thanks

Abhijeet Upadhyay

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

It won't work since it seems it is is not designed to work like that from list view.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Tom Blanchard
Kilo Expert

Create a UI Context menu and include the below script:

var url = new GlideURL("your_url_here.html"); 
window.location = url.getURL();

 

If you are using a UI action instead, make sure it is set as a Client UI action, and use the same script, or

function onClickRedirect() {  
window.location.href = 'your_url.do';
}