Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to change list view with UI action?

EJ13
Tera Contributor

Hi all,

 

I am trying to create a UI action on the Incident table that will switch the view to the Self Service view. Unfortunately I have not been able to find a solution. The goal is to create a related link at the bottom of the list view called "Self Service View" that changes the view when clicked. I have successfully created the related link, but when I click it I just get a message that says "no record selected". What am I doing wrong?

 

EJ13_0-1757360612432.png

 

Thank you!

 

1 ACCEPTED SOLUTION

Ajay_Chavan
Kilo Sage

@EJ13 - please use below:

 

function redirectToSelfService() { window.location.href = 'incident_list.do?sysparm_view=ess&sysparm_userpref.incident_list.view=ess'; }

 

client- true

conlick- redirectToSelfService()

 

Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

View solution in original post

2 REPLIES 2

Ajay_Chavan
Kilo Sage

@EJ13 - please use below:

 

function redirectToSelfService() { window.location.href = 'incident_list.do?sysparm_view=ess&sysparm_userpref.incident_list.view=ess'; }

 

client- true

conlick- redirectToSelfService()

 

Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

EJ13
Tera Contributor

This worked, thank you!