- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 03:47 AM
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"?
JK
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 05:51 AM
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
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 05:51 AM
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
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 07:59 PM
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2026 04:52 AM
Hi @Ankur Bawiskar,
Thanks for the article, I've used navigation handler and it worked as I expected. But still, it is not completely restricting the user from changing the view.
var gr = new GlideRecord('incident');
if (gr.get(g_uri.get('sys_id'))) {
if (gs.getUser().hasRole('itil'))
g_uri.set('sysparm_view', 'playbook_card');
}
answer = g_uri.toString('incident.do');
JK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2026 04:55 AM
so are they able to switch?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2026 04:57 AM
Yes, initially it is setting the view as I specified in the navigation handler, but they can be able to change the view.
JK
