- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 02:34 AM
How to restrict only ITIL user to edit filter condition ?
Incident form in Related list under on specific related list where ITIL user can edit the filter but for those filter condition should be Read only for ITIL role then others
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 04:49 AM
An ITIL user, when you click on the edit button of Attached knowledge related list, by default it shows
you the published articles. However, the ITIL user can change the filter and select any article or block and add to the incident. Please restrict the filter edit for the TIL role.
this is the requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 06:14 AM
OOB only users with ITIL role can see related list
End users can't see related list
What other roles are trying to edit this filter, if you can specify ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 06:36 AM
Hi,
you will require UI script to hide the filter when somebody clicks the Edit button other than itil
Note: it requires DOM manipulation which is not recommended
here is the solution for this
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-24-2022 07:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 07:19 AM
Hi,
link with solution I already shared; just enhance it
Sharing the solution again with script
1) create UI script with type Desktop, Global = True
2) script here
Ensure you give correct table name here from where you are clicking the Edit button
Example: I am clicking Edit button from incident form so I gave sysparm_collection=incident and I see problem records when I clicked Edit button i.e. Related list of Problem so I gave sys_target=problem
addLoadEvent(hideFilter);
function hideFilter(){
if(g_user.hasRoleExactly('itil')){
var url = document.URL;
if(url.indexOf('sys_target=problem') > -1 && url.indexOf('sysparm_collection=incident') > -1){
document.getElementsByClassName('col-sm-offset-2 col-sm-8 m2m_filter_container')[0].style.display='none';
}
}
}
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-26-2022 11:23 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader