How to make UI Action invisible from UI policy or Client script based on condition

Asmita7
Tera Expert

Hello friends,

 

There is an OOTB UI Action which I do not want to customize.

My requirement is that the UI Action is visible based on some condition / inputs on the page.

 

Can I achieve it through UI policy or client script ?

 

Please suggest.

11 REPLIES 11

Hi @Asmita7 

 

You can simply use insert and stay button to make a copy of that UI Action and add your conditions there. You can inactive the OOTB UI Action after that.

Prathamesh G
Kilo Sage
Kilo Sage

Hello @Asmita7,

 

I am sure not that we can hide the UI action using any client script or UI Policy. We can hide it only using through the conditions on the UI action itself.

Prathamesh_0-1703743393860.png

 

If the above solution resolve your issue, Please mark the solution as 'Accepted Solution' and also mark it as 'Helpful'.

 

Thank You!

Prathamesh.

 

Yes. But the problem is client is not agreed to change any OOTB UI action condition.

Ankur Bawiskar
Tera Patron
Tera Patron

@Asmita7 

you can show/hide it using client script but it requires DOM manipulation which is not recommended.

I won't recommend that

If you still require check this link and enhance the logic

Unable to show/hide UI action located at the bottom of the form through a UI policy. 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Asmita7 

please check the link I shared above.

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