View Rules - Force the DEFAULT view? Not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 01:43 PM
Has anyone ever used a View Rule to force users to see the 'Default view'? I checked in sys_ui_view and it seems the Default view does not have a name (it is empty). Therefore I do not know what to return from my view rule. I am returning an empty string, but it is still allowing the users to change the view.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 01:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2019 01:58 PM
Or if you need to script it, this should work..
(function overrideView(view, is_list) {
// Add your code here
if(gs.getUser().hasRole('admin'))
{
answer = ''; // set the new view to answer
}
else{
answer = 'ess';
}
})(view, is_list);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2019 07:49 AM
Those are not working for me. It appears if a user has the view_changer role, it overrides Advanced View Rule scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2019 11:27 AM