How to hide UI Action on vendor assessment portal?

Utkarsha
Tera Contributor

Hi All,

I have been digging through servicenow doc on hiding ui action on svdp portal, but no use... I have to restrict delete contact ui action only for admins....I have added the role in 'requires roles' section and added the condition as well...gs.hasRole("admin") in the ui action but still the button is visible for users with vendor_contact role....could anyone suggest me how can I fix this ?

Any kind of help is greatly appreciated.

Thank you,

5 REPLIES 5

Community Alums
Not applicable

Hi @Utkarsha  ,

Go to UI actions list from Navigator and look for the below record :

SandeepDutta_0-1704377826346.png

Then in the condition field add "Admin" as has role, :

SandeepDutta_1-1704378062769.png

 

 

 

Hi @Community Alums ,

Thank you for your inputs on this......I modified the condition for the same UI Action ...but button was still visible

I checked in widget configuration on the portal...it's a widget button so restricted the button from the server side
script

Thank you

Community Alums
Not applicable

Hi @Utkarsha  ,

Glad you were able to get the answer.

 

Hi @Utkarsha  ,

 

How did you modified the server side script? I believe it's not editable unless you clone the widget.