Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to restrict the view based on role

JK9903
Mega Guru

Hello everyone,

I would like to restrict users from changing the view in the RITM and sc_task tables. Specifically, if a user has the "xyz" role, the view should always remain as "demo view," and they should not be able to switch to any other view.

 

I have already created a view rule for this requirement, but users are still able to change the view. Is there a way to enforce the view so that they are always restricted to "demo view"?

Thanks,
JK
5 REPLIES 5

Ankur Bawiskar
Tera Patron

@JK9903 

see this KB which talks about this, it says don't use script to set view
Script doesn't set the view in the View Rule

also explore about navigation handler and see how it works

ServiceNow Hidden Gem #1: Navigation Handler  

Navigation handler 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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