Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Interaction table: Force 'sow' view for itil users

hamidouche
Mega Guru

Hi,

I created a view rule to force itil users to the SOW view.

 

(function overrideView(view, is_list) {
if (gs.hasRole("itil") && !gs.hasRole('admin'))
answer = "sow"; // set the new view to answer

})(view, is_list);

The problem is that the user can change the view. How can we block that?

This KB View Rule script does not force the view on an incident form - Support and Troubleshooting  does not address the issue because without the Advanced option there is no way to specify the view for ITIL users only.

 

3 REPLIES 3

abbasshaik4
Tera Sage

Hello @hamidouche,

 

Please refer to the link below:
Navigation handler • Yokohama ServiceNow AI Platform user interface • Docs | ServiceNow

 

If it is helpful, please mark it as helpful and accept the correct solution by referring to this solution in the future it will be helpful to them.

Thanks & Regards,

Abbas Shaik

Hi @abbasshaik4 

I reviewed the link to the Navigation Handler. I don't understand why they're using the hr.TABLE_CASE. I tried to change it to interaction but it's not working. Our instance does not have an HR Profile table

Ankur Bawiskar
Tera Patron

@hamidouche 

that KB informs about the OOTB behavior

If you use view rule script then you can switch and you can't control this

💡 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