Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Help with View Rule

Abhijit Das7
Tera Expert

Hi 

 

I have created a view rule. For users with exactly 'itil' role, custom view should become main view, and they should not be able to change view. But for users who doesn't have itil role, for the custom view should become the main view, but they should be able to change to other views as well.

 

How can I achieve this task?

 

(function overrideView(view, is_list) {

    // Add your code here
    if (is_list) {
        if (gs.hasRole("itil")) {
            answer = "customViewName";
        }
    }

    

})(view, is_list);

 

Thanks 

0 REPLIES 0