UI Action visibility

Devika
Tera Expert

There is a custom UI action where it should be only visible to users with "itil" and "sn_incident_write" ,but it is not working as expected .
Can anyone help me on this ?Screenshot 2026-01-13 231432.png

9 REPLIES 9

Hello @PoonkodiS 

it is not working

dgarad
Giga Sage

Hi @Devika  

From your screenshot I  can see .Client is checked .Replace your condition with the client-side equivalent g_user.hasRole('itil') || g_user.hasRole('sn_incident_write')
If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad

yashkamde
Tera Expert

I think you are trying in new record and that can be the issue as show insert checkbox in not check..

Also check the user should only have 'itil' and 'sn_incident_write' role only..

Ankur Bawiskar
Tera Patron

@Devika  

you can add roles in the Required roles section

Your existing condition looks fine

share complete UI action config screenshots

AnkurBawiskar_0-1768391812827.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Anurag Tripathi
Mega Patron

Hi,

Why don't you use the OOB method to add role instead of writing it in the condition. Look into the Requires Role Section

AnuragTripathi_2-1768392441127.png

 

 

 

-Anurag