Readonly Breadcrumb

ashwani_eshoppi
Kilo Expert

I have created a module which shows up the received emails related to the logged in user.

But the issue here is that the user can click on the filters and remove the filters.

I checked the article

Restricting Filters and Breadcrumbs - ServiceNow Wiki

I tried creating a script include named 'sys_emailDisplayFilter' ,   and the function to set answer as true only for admin.

But when I impersonated as user with itil user, still the user can play with the filters/breadcrumbs.

How can I make the breadcrumb/filters readonly.

1 ACCEPTED SOLUTION

Try to do cache flush by cache.do and see if it fixes the issue


View solution in original post

17 REPLIES 17

Also, try this code:



function sys_emailDisplayFilter() {



    var answer = false;



    if (gs.hasRole("admin")) {


          answer = true;


    }



    return answer;


}


ashwani_eshoppi
Kilo Expert

cache flush was the issue Thanks Mani


Ashwani,



Thanks for the update. Can you mark the answer as answered which will help others.


ashwani_eshoppi
Kilo Expert

Yep done


Hello Ashwani,



Can you tell me along with script include,what else need to write.


How script include will be called?




Thanks,


Smruti