Can we hide action button using UI policies ?

String
Kilo Sage

Hi Team ,

Am trying to make read only  priority , short description fields and hide Assign to me button  in case form when state is in progress .

So am trying to use UI policies ,I can make read only priority & short description ,but unable to hide the  Assign to me button ,Please guide me best pratices 

 

 

4 REPLIES 4

Peter Bodelier
Giga Sage

Hi @String,

 

You can only use conditions, views, and roles with the UI Actions configuration to hide UI Actions. It's not possible to do that with UI Policies or Client Scripts


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

RaghavSh
Kilo Patron

This is possible with DOM but that is not recommended by servicenow.

Dont apply any DOM manipulations in your instance as that get highlighted in instance scan and have the possibility of breaking in future releases.

 

UI actions have condition field to make then show/hide. I know you are trying to achieve that on client interation but that is not possible.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023

Omkar G1
Tera Expert

Please modify the conditions for the "Assign to me" UI Action according to your requirement.

Hiding UI actions via UI policies is either not possible or definitely not recommended.

MattSN
Mega Sage
Mega Sage

If it needs to be done before the record is submitted you can see an example of this OOB on the change_request table. After submission this should be controlled by the UI Action condition.

https://www.servicenow.com/community/itsm-articles/how-to-hide-show-the-ui-action-by-client-script/t...