Incident Form

ServiceNow40
Tera Contributor

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.

3 REPLIES 3

Runjay Patel
Giga Sage

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

-------------------------------------------------------------------------

yuvarajkate
Giga Guru

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. 

yuvarajkate_0-1734673206993.png

 

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;
}

yuvarajkate_1-1734673576011.png

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.

 

 

vishwajeet5550
Mega Guru

in this scenario we can write the Access Controll List(ACL) on the Group A like

 

In Attached screenshot can create the ACL for this problem

  

Please mark helpful/correct if it helped you in any way.