Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Read only all incident field to other group members

Mani60
Tera Contributor

Hello All,

I have one requirement on incident table Only assignment group members can edit the respective incident and other group member it should be read-only.
Could you please help me on this to get the proper solution.

 

Thanks,

Manish

4 REPLIES 4

SatyakiBose
Mega Sage

Hello @Mani60 

The best solution would be to have an ACL.

You need to have a read ACL which gives read access to all the groups.

Secondly a write acl giving access to write only if the current users is a member of the group the incident is assigned to. You need to use the getMyGroups function to achieve this.

Please refer to this article here - https://servicenowguru.com/scripting/script-includes-scripting/advanced-getmygroups-function/#:~:tex....

priyasunku
Kilo Sage

Hi @Mani60 

 

In the write ACL for incident you can write below script 

 

if(gs.getUser().isMemberOf(current.assignment_group);

 

and 

in Read ACL  you can specify the role to whom incident form should be shown.

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

@Mani60 Please mark my answer as correct if it helped you.

Apps10
Tera Contributor

Hello @Mani60 ,

This can be one by providing write and read ACL for incident.
as suggested by @SatyakiBose and @priyasunku.

 

Thanks