function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gabriel MocelinGabriel Mocelin 

How i display a custom field in a lookup field?

Hi guys, I was wondering how to show a custom field in the search field instead of the "Name" field. As you can see in the image below, I use automatic numbering for the "Name" field (changing to text is not an option) and then I wanted to show another field instead.
User-added image


 
Agustin BAgustin B
Hi Gabriel, this is how you do that:
https://help.salesforce.com/apex/HTViewHelpDoc?id=search_enhanced_lookup_specify_filters.htm&language=en

If it helps please mark as correct, it may help others with the same question.
ShirishaShirisha (Salesforce Developers) 

Hi Gabriel,

Greetings!

You can actually set the secondary field on the search layouts since the Name is an auto Number field and it is very difficult to search with.

Please find the more information on the same here.

https://help.salesforce.com/articleView?id=search_lookup_config_lex.htm&type=5

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

vishal patrovishal patro
Hi Gabriel Did you find any answers to your query ? I was having the same query as well how can we display any field instead of auto number value in the lookup field value