How to make a incident form read only for specified group ?

1dusjhyahnt
Tera Contributor

How to make a incident form read only for specified group by using ACL 

1 ACCEPTED SOLUTION

Rajesh_Bhise
Tera Guru

Hello @1dusjhyahnt,

 

I would use below script to achieve the requirement via ACL.

 

Create the "Write" ACL on target table and put below script.

 

answer = true;

if(gs.isMember("<Desired _group_name>")){

answer= false;

}else{

answer = true;

}

 

Kindly mark my answer as helpful✔️ and the solution accepted💯 if it serves the purpose.

 

Thanks and Regards,

Rajesh

View solution in original post

15 REPLIES 15

Hello @1dusjhyahnt,

 

As per your question, you require to set read only incident form (means all fields).

Hope you are correctly created ACL on table level.

type - record

ALC operation - write 

 

script

*************************************************************************

var answer;
var usrgrp = new GlideRecord('sys_user_grmember');
usrgrp.addQuery('group','26e6176ac32c3010abc8b5183c40ddd9'); //sys_id of Fallout Managers group
usrgrp.addQuery('user',gs.getUserID());
usrgrp.query();
if(usrgrp.next()){
answer = false;
}
else{
    answer = true;
}
*********************************************************************
 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.

Happy to help you in future.

Thank you,
Rajesh