Only current Assignment Group should have access to update Assignment Group field on Incident form

Bargavi
Mega Expert

Only current Assignment Groups should have access to update Assignment Group field on Incident form.

 

Please help! I tried business rule but able to select groups which the user is member of but unable to restrict group change if user is not member of group.

Suppose: Incident 123 is assigned to Network group only users from Network must be able to update assignment group of Incident. For all other users there must be an error message.

 

Thanks in advance!

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

Build you ACL condition as 

 

Ok...You will have to write script in the ACL as below

answer = false;

if (current.assignment_group!='' && (gs.getuser().isMemberOf(current.assignment_group.toString()) || gs.getuser().isMemberOf('ServiceDesk') || gs.getuser().isMemberOf('Network')))

{

answer = true;

}


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

14 REPLIES 14

SanjivMeher
Kilo Patron
Kilo Patron

Build you ACL condition as 

 

Ok...You will have to write script in the ACL as below

answer = false;

if (current.assignment_group!='' && (gs.getuser().isMemberOf(current.assignment_group.toString()) || gs.getuser().isMemberOf('ServiceDesk') || gs.getuser().isMemberOf('Network')))

{

answer = true;

}


Please mark this response as correct or helpful if it assisted you with your question.

thanks so much i was able to get it working with small modification. (Removed ".toString()" for 

 

answer = false;

if (current.assignment_group!=' ' && (gs.getUser().isMemberOf(current.assignment_group) || gs.getUser().isMemberOf('Service Desk') || gs.getUser().isMemberOf('Network')))
{
answer = true;
}

 

thanks!

 

 

To keep it editable if assignment group is blank, replace with below script

 

answer = false;

if (current.assignment_group==' ' || gs.getUser().isMemberOf(current.assignment_group) || gs.getUser().isMemberOf('Service Desk') || gs.getUser().isMemberOf('Network'))
{
answer = true;
}


Please mark this response as correct or helpful if it assisted you with your question.

I have one last question assignment group field is grade out when creating a new incident? how can I prevent this?

Thanks!

Replace with below code

 

answer = false;

if (current.assignment_group==' ' || gs.getUser().isMemberOf(current.assignment_group) || gs.getUser().isMemberOf('Service Desk') || gs.getUser().isMemberOf('Network'))
{
answer = true;
}

 

Please mark my response correct if it works


Please mark this response as correct or helpful if it assisted you with your question.