- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 06:10 PM
I have a default filter as below in my related list given using the list control option. My requirement is when i click on the "Edit" button in the related list, it should show the filter only for a certain role. And when an user with a manager role logs in this filter should not be applied. I have checked the "Omit filer condition" and added the below code to the filter condition as well. Still the people with the manager role has got this filter on.
Any idea on how to show this filter only for certain role.
if (gs.hasRole('xx') || gs.hasRole(xx)) {
answer = true;
} else {
answer = false;
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 09:07 PM
Hi,
when you set answer=true it would hide the filter
did you add logs in that script?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 09:07 PM
Hi,
when you set answer=true it would hide the filter
did you add logs in that script?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader