ITIL user not part of assignment group should not edit the assign_to field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 08:19 AM
Hi Team,
I have return below script to restrict ITIL user if they are not part of the assignment group to edit assign_to field on the incident form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 08:29 AM
Hi Vaibhav,
Try using the below modified line (remove ==‘true’) since this might be taken as string in stead of boolean value.
> if ((uerhasadmin) || (userhasitil)) {
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 08:38 AM - edited 10-24-2024 08:39 AM
You should do this with a Write ACL on the incident table instead of an unsupported / not recommended GlideRecord in a Client Script. The logic will be easier since you can use conditions and/or isMemberOf in the server script, and admin override so you don't need to specify that separately. This will also prevent update from a list view and other ways that client-level security fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 09:06 AM
Hi @VaibhavJ ,
Gliderecord does not work properly in client side, hence you are not getting correct result.
you can do below. also there is one acl which runs for assigned to filed.
You have to modify the existing field level ACL like below.
I have tested this, it is working.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
LinkedIn: https://www.linkedin.com/in/runjay
YouTube: https://www.youtube.com/@RunjayP
-------------------------------------------------------------------------