Incident Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 09:20 PM
In Incident form user select the Caller and Short_description and Assignment Group there are two groups like Group A & Group B.
Group A members can try to edit the any values in incident form.
Group B members can try to edit any values but no access for Group B members.
Any idea how to build above scenaior and what script should be use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 09:48 PM - edited 12-19-2024 10:02 PM
Hi @ServiceNow40 ,
You can create write acl on incident like table.*. Use below code in ACL.
// Allow members of Group A to edit the incident
if (gs.getUser().isMemberOf('Group A')) {
answer = true;
} else {
answer = false;
}
For more details about ACL you can check this blog: https://servicenowwithrunjay.com/access-control-list-acl/
-------------------------------------------------------------------------
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
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 09:54 PM
Have you tried writing ACLs for this?
You will need to write 2 ACLs for this.
For the First Scenario Select Incident Table and All Fields. And Select Group A.
For Second Scenario you will need to write a simple script. Select the advance option and use the following Script.
if (gs.getUser().isMemberOf('Group B')) { //Use the actual group name here
answer = false;
}
Group B members would be able to make changes to the data.
This way provides good security.
Please mark this as Correct or Helpful if it helped you in any way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 11:33 PM