Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Ui Action should not visible to admins

sundeep pottepa
Tera Contributor

Hi,

 

There is Close button on change form i want to add visibility conditions to it. Assigned to user and change manager should only see that button. I have given condition in condition field and its working but the issue is admins are able to see that button I don't want that. so I gave another condition like role should not be admin. Now, admins are not able to see the button even though they are in Assigned to field or change manager. The button should be visible based on change manager role and assigned to user even if the user is admin he should satisfy the condition.

 

 

Thanks & Regards

Sundeep

1 REPLY 1

Not applicable

Hi @sundeep pottepa ,

Update the condition like below in UI Action.

(gs.getUserID()==current.assigned_to&&gs.hasRole('admin'))||gs.hasRole('change_manager')

 

Regards,

Namrata