I came across a similar case previoulsy and I used a pre-condition with calculation to hide the action based on a user's group membership. Below is an example about this calculation used in the Incident Management:
static def GetAttributeValue(Incident):
CurrentUser = Incident.GetCurrentUserName().ToLower()
User = Incident.GetObjectByAttribute("System.User", "Name", CurrentUser)
for Groups in User.UserGroups:
if Groups.Group.Title == "Service Desk":
Thank you for your response!
In fact, your metho really can help to hide aсtions for specific groups. But we also already use that method and both of actions are allowed only for "Service Desk" group.
So, we need to hide one of that actions excactly for members of the group "Service Desk", because our customer is a big company with more than 15000 requests per month and they do not want to be able to see action "Relate child request" in every status. They just want to have one action "Relate Parent request" in the first status and be able relate every exisist request without any other visible actions.
If that's the case, why don't you take off that action from each status? This can be done by highlighting the required status in the Process Designer, Go to Properties > Optional Actions and move it away.
Because we need to use "Relate Parent requst" in the first status of the request object and be able to relate any existing requests. It's mean that we should activate the action "Relate Child request" in every request's status for users, who have access to do "Relate Parent action" action.
Thank you, Motaz.
I saw that article, but it is helpful in the case of creation new related object. It's not working with situation , when we should relate two existing objects.