How to hide Cusomt ui action in Service Portal form view

manibaig
Mega Guru

Trying to display a ui action in servicnow but not on portal. how to hide it on the portal. I tried this in client script in the widget but didn't work
  hideButtons();
  function hideButtons(){
   $('button[name="ui action name here"]').hide();   }

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

I haven't tried this, but can you try and see if you can accomplish this via CSS?

such as (EXAMPLE😞

button[name=update] {
display: none;
}

So you'd place this in the CSS for the widget. Although you may need to try it in the page CSS as well.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

6 REPLIES 6

Can you try to go to the UI Action, scroll down to the bottom, and in the UI Action Visibility section, exclude the Service Portal view? (if that is your view)...you'd need to find out your view to ensure, but usually it's: Service Portal

find_real_file.png

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Tried that already, form view is hard coded it seems and i couldn't force sp view on form widget. so i inspected the page found the property of that ui action and add this in css. it worked Thanks for helping on this really appreciate it
find_real_file.png