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.

How to restrict List edit on "State" field on case list to Case Managers group

Sai Pranitha Pu
Kilo Contributor

I want the State Field in List view should not be editable until the user belongs to Case Manager Group.

How to Achieve this?

1 ACCEPTED SOLUTION

Chandra Sekhar6
Tera Guru

Hi,

Create a List Edit ACL on Case table

find_real_file.png

In Script:

Write the following code:

answer = false;
if (gs.getUser().isMemberOf('sys_id of Case Managers Group Name')) {
answer = true;
}

View solution in original post

3 REPLIES 3

Chandra Sekhar6
Tera Guru

Hi,

Create a List Edit ACL on Case table

find_real_file.png

In Script:

Write the following code:

answer = false;
if (gs.getUser().isMemberOf('sys_id of Case Managers Group Name')) {
answer = true;
}

Thank you it worked

Aman Kumar S
Kilo Patron

Create an LIST EDIT ACL on the form

Click Advanced checkbox as true

in the script, add below code:

 

answer = checkGroup();

function checkGroup(){

   if(gs.getUser().isMemberOf("Case Manager")){// verify group name

     return true;

   }

   else{

     return false;
   
  }
}

 

Best Regards
Aman Kumar