How to hide a look up button from the reference field?

gowthamaa_mohan
Tera Contributor

gowthamaa_mohan_0-1721725678323.png

I want to hide the look up button from servicenow in any reference field, Kindly help me to achieve this requirement.

5 REPLIES 5

Satishkumar B
Giga Sage
Giga Sage

Hi @gowthamaa_mohan 

please check the below solution:
https://www.servicenow.com/community/itsm-forum/how-to-hide-search-box-on-list-collector-for-a-catal...

 

……………………………………………………………………………………………………

Please Mark it helpful 👍and Accept Solution✔️!! If this helps you to understand. 

SN_Learn
Kilo Patron
Kilo Patron

Hi @gowthamaa_mohan ,

 

Please check the below KB:
Remove the magnifying glass and Info pop up on a reference field 

 

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Robbie
Kilo Patron
Kilo Patron

Hi @gowthamaa_mohan,

 

This can be easily achieved by an onLoad Client Script as per below. (Tried and tested on my PDI before responding)

 

 

 

function onLoad() {

//Hide the magnifyling glass
var fieldWhereToHide = 'caller_id'; //change the value caller_id for your field name which I assume is division or u_division
g_form.getElement('lookup.' + g_form.getControl(fieldWhereToHide).id).style.display = 'none';
   
}

 

 

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.



Thanks, Robbie

 

Shout out to rmoraski who provided the solution way back when here: https://www.servicenow.com/community/developer-forum/how-can-i-remove-the-magnifying-glass-and-info-...