hide information button on a record producer

patrickmcgonagl
Mega Expert

I need to hide the info button that shows next to the reference field for caller_id on a record producer that clients will use to submit ESS tickets

1 ACCEPTED SOLUTION

It may not appear on the form until it's populated, so you might have to run the script again onchange of that variable. You can see that it's not all that scalable, so I would avoid doing this unless you have to.


View solution in original post

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I don't think there's a great way to do it just for a single record producer other than DOM manipulation.


Customizing the Reference Icon - ServiceNow Wiki



You could do the following in anOnchange client script running on your reference field if the newValue is not empty:



var variableName = 'name of reference variable';


var id = g_form.getControl(variableName ).id;


$(id + 'LINK').hide();


That worked for the most part. I'm able to hide the info button using that in a catalog client script, but there is also another field that is initially hidden on the form until a field evaluates as true/yes, when that field is shown and the field gets populated, it shows the info button for that field


It may not appear on the form until it's populated, so you might have to run the script again onchange of that variable. You can see that it's not all that scalable, so I would avoid doing this unless you have to.