Setting view when record is accessed from list view

samadam
Kilo Sage

I am trying to default a view to testview for incident when access from a list. I tried to create view rule as follows but is doesn't work. Any ideas?

samadam_0-1730655450634.png

 

 

3 REPLIES 3

B_Engelstock
Tera Expert

You are missing the { and } characters.

if ( -criteria-) {

do this

}else{

do something else

}

dhanrajb
Tera Guru

Hi @samadam ,

 

Is that view name correct? Cross verify the name of view in "sys_ui_view" table. I believe that will fix the issue.

 

Regards,

Dhanraj.

Runjay Patel
Giga Sage

Hi @samadam ,

 

You can use below script.

 if (is_list)
        answer = 'your view name';
    else
        answer = null; 

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------