Sulabh Garg
ServiceNow Employee

Hello Hritik,

Why you are writing a UI policy to hide the UI action. Instead you can specify the conditions under UI actions only to hide the UI action.

Here in the UI policy script you are using DOM to hide the UI action which is not the best practice and it may vary the results based on the browsers/upgrades.

Hope it helps!!

 

Please Mark Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Jaspal Singh
Mega Patron

Why don't you directl pass the condition in the Condition field of the UI Action.

No need of DOM manipulation

suvro
Mega Sage

Set the condition in the condition field of the UI Action not via client script. (current.subject_to_gxp  == 'No')

find_real_file.png

View solution in original post

Condition is not working in list view

I have an out of the box UI action where I have conditions already mentioned and it is not allowing to type further code in this field, how can I accomplish the similar requirement in this case?