Need to set Default view by default for all the ITIL Users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2018 05:40 AM
Hello,
Can anyone pleae help me out how to set any ITIL User with Default View even though if user change the view later when they come back or refreshed it should be set to Default View.
Ex: ITIL User opens list of open incidents & with the help of list control they change the view to Mobile view now when the user again refresh or later when he/she comes back it should be set to Default view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2018 05:43 AM
Hello,
you need to use "view rule" it override user preferences for views
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2018 07:22 AM
Thanks for the reply.
I already created a View Rule with below script:
(function overrideView(view, is_list) {
// Add your code here
if (gs.hasRole("itil")) {
answer = "default";
return answer;
}
//answer = "ess";
//answer = null; // set the new view to answer
})(view, is_list);
It is setting Default for the first time but if the user changes the view later it is not resetting it to Default. Our actual requirement is to reset the view Default even the users change the view later if they refresh it should be refreshed to Default
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2018 02:53 AM
Hello,
Sorry for the late response but you can use Navigation Handlers an alternative to view rules and gets executed each time the user call the data in a form view , Refer to this thread for more information
https://community.servicenow.com/community?id=community_blog&sys_id=9d8d2669dbd0dbc01dcaf3231f9619ae
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2018 04:48 AM
One more thing there is a property "glide.ui.remember_view" that enable or disable the use of user preferences for the last view so if you set it to false the view rule will always override user preference
Hope this will help