How to use user role conditions in the SOW Action assignment UI Actions

DNC
Tera Contributor

We have the Resolve button (Action Assignment - sys_declarative_action_assignment ) in the Incident SOW, my requirement is to show Resolve for only "itsm_sem" users, I have added that condition as below.

 

"new global.IncidentUtils().canResolveIncident(current) && gs.hasRole("itsm_sem")"

 

But when I impersonate with the "itsm_sem" role users, that Resolve UI Action is not available.

 

 

 

and I have seen "Required roles" , "Required user role names", their also I have tried it, but Resolve is not visible to the "ITSM_SEM" users.

 

Can any one help on this to make the resolve should work for the "itsm_sem".

 

 

Thanks

 

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@DNC 

those users should also satisfy the existing condition, if they don't then they can't see

new global.IncidentUtils().canResolveIncident(current)

if you are saying condition need not be checked and still those role users should be allowed to see then use OR condition

new global.IncidentUtils().canResolveIncident(current) || gs.hasRole("itsm_sem")

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

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@DNC 

those users should also satisfy the existing condition, if they don't then they can't see

new global.IncidentUtils().canResolveIncident(current)

if you are saying condition need not be checked and still those role users should be allowed to see then use OR condition

new global.IncidentUtils().canResolveIncident(current) || gs.hasRole("itsm_sem")

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