The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Field decorator on workspace

BHAVANI B
Tera Contributor

I'm not able to hide field decorator created on 'Action assignment' table for a field onChange. How can we hide it onChange?

6 REPLIES 6

Ankita_Patil
Tera Contributor

Hi @BHAVANI B ,

 

ServiceNow does not provide a native g_form API method to hide or control field decorators directly.

However, you can use a supported workaround by manipulating the DOM using an onChange Client Script.


We have create new UX client script? And how to access the DOM?

Anand2799
Giga Guru

Hi @BHAVANI B ,

 

You can use following code in your client script to remove decoration

g_form.removeDecoration('caller_id', 'icon-star', 'VIP'); //removeDecoration(String fieldname, String icon, String title)


Thanks

Anand

This will add or remove the icon next to field name, but I want to hide the field decorator inside the field

BHAVANIB_0-1758704182823.png