The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How can I restrict that only the support groups which the task is assigned can modify it?

fabiangr
Mega Contributor

Dear All

I am new in servicenow and I have a request since into the problem tasks everyone can manipulate the task even if they don not belong to the support group.

I would like to know how can I restrict that only the support group which the task is assigned can modify it

1 ACCEPTED SOLUTION

You wont able to create because write ACL does not allow you to do so,


please modify write ACL code to below.



please replace code with below, it will work.



if(!current.isValidRecord())


{


answer = true;


}


else


{


answer = gs.getUser().isMemberOf(current.assignment_group);


}


View solution in original post

22 REPLIES 22

Matt Saxton - G
Kilo Guru

Thanks for your quick response Matt.



Do you have an example?


ACL



problem_task.write



Script:



answer = gs.getUser().isMemberOf(current.assignment_group);



http://wiki.servicenow.com/index.php?title=Getting_a_User_Object#gsc.tab=0



myUserObject.isMemberOf()

-- returns true or false if the current user is a member of the provided group (takes a group name or sys_id as its argument)


Keep in mind that these kinds of security requirements can be too restrictive.


If the tickets assignment group gets cleared, you'll then find no-one can modify the ticket.


It could also get assigned to an empty or incorrect group.


You may wish to include another type of user who can modify tickets regardless of the assignment group.




If users are modifying tickets they shouldn't, everything is audited. These type of restrictions are often not necessary and cause more problems than they solve.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Agree : These type of restrictions are often not necessary and cause more problems than they solve.