#1MinuteTip In Salesforce, when you click on a lookup field, there are two values that are displayed. The “Name” field of the lookup object and a second field. So, how do you change the 2nd value displayed in lookup field?
For example, when you create a case and click on the field to add the contact, it will display the Contact Name & Account name like the image below.
The information displayed as the 2nd value comes from 2nd column defined in the Search Layouts -> Default Layout on the object as shown below.
To display a different value, change the 2nd field in the Default Layout. Liked I have changed it to Phone.
And now, phone will be displayed as the 2nd value in the lookup field for Contact.
To display multiple values, you can create a formula field and set that as the 2nd column in Search Layouts -> Default Layout. I created a formula field of text type to concatenate Email & Phone on the Contact object and added that field as 2nd column in Search Layouts -> Default Layout. And now the lookup field shows the value as shown below.
IMPORTANT: Do note that not all the field types can be displayed as the 2nd value in the lookup field. For example, if you set the field type “Email” as 2nd column in search layout, it won’t be displayed in the lookup field. In that case, 3rd column from the search layout will be displayed. Do take a look at the Salesforce help article below to see those exceptions.
References & Useful URLs
- Salesforce Help Article – Secondary Fields are Displayed for Instant Results on Search for Recently Viewed Records