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

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!

Didn't work

What did you use for the name?


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

I tested using simply by "Save" button and then i added name of my ui action "Submit Review". It didn't work in both cases.  Using custom Form widget not oob though