Restricted Assigned to field on problem record

sureshp89882164
Tera Contributor

Need help on to create ACL for The Assigned to field should be writable by current Assignment Group and Global problem management team only on Problem record. And in New state Assigned to field should be writable by everyone.

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@sureshp89882164 

you can use advanced script in field level WRITE ACL

I hope you know you should have security_admin role and how to create ACL

Something like this, please enhance if required

if (current.state.toString() == '101') { // '101' represents the 'New' state
    answer = true; // Allow write access for everyone in New state
} else {
    // Restrict to Assignment Group members or Global Problem Management role
    var user = gs.getUser();
    answer = user.isMemberOf(current.assignment_group) || gs.hasRole('problem_management_global');
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I have tried this code, but it is not working.

Thank you

@sureshp89882164 

share what did you configure so far? share screenshots

what debugging did you do?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

sureshp89882164_0-1746175234234.png