The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Force specific view for users with itil role

oliolio
Giga Guru

Hi,

 

We need to force a view for all users with the ITIL-role on change and problem tables. They should not be able to switch views for these tables but we do not want to remove the view_changer role as we want them to be able to change views in other tables.

 

In the past i've accomplished this using an advanced view rule but Servicenow now states that this is is not going to enforce the view (see KB0997033). 

 

Does anyone know how to accomplish this. That is, forcing a view on specific tables without removing the view_changer role from users?

1 ACCEPTED SOLUTION

oliolio
Giga Guru

So i managed to figure it out. 

What the old "Advanced" view rules could achieve can now be done using Navigation handlers. 
Examples from servicenow available here: Navigation handlers.

NOTE: There's an error in the example script where the GlideRecord variable does not match the variable later used in the script. 

To set the view as forced use g_uri.set('sysparm_view_forced', 'true') .

View solution in original post

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @oliolio 

If KB is not helping, then log a now support case.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

oliolio
Giga Guru

So i managed to figure it out. 

What the old "Advanced" view rules could achieve can now be done using Navigation handlers. 
Examples from servicenow available here: Navigation handlers.

NOTE: There's an error in the example script where the GlideRecord variable does not match the variable later used in the script. 

To set the view as forced use g_uri.set('sysparm_view_forced', 'true') .