Need to set Default view by default for all the ITIL Users

shaik_irfan
Tera Guru

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.

5 REPLIES 5

khadija3
Tera Guru

Hello,

you need to use "view rule" it override user preferences for views

Regards

Thanks for the reply.

 

I already created a  View Rule with below script:

 

find_real_file.png

 

(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

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

 

 

https://docs.servicenow.com/bundle/jakarta-platform-user-interface/page/administer/navigation-and-ui...

 

Regards

 

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