When using a Salesforce lookup field to link a record to a record in another object, if a user selects the ‘all fields’ radio button, only the contents of text fields will be searched. Data contained in picklists and other field types are not accessible on the lookup.
A workaround for searching on fields other than text fields is to build a Salesforce Process that will populate a new custom text area field with values from non-searchable fields.
Steps for Enhancing the Salesforce Lookup Field Search
Step 1: Add a new custom text area field to the object the Salesforce lookup field is referencing. A text area field can store up to 255 characters.
In this example, the object is called ‘Molecule’ and the new custom text area field is called ‘Molecule Search Terms’.
Step 2: In the Process’s criteria definition, select ‘No criteria—just execute the actions!’. Create an immediate action on True called ‘Populate Search Support’.
Step 3: In the Action, use a formula to populate the text area field with one or more picklist values, formula values, etc. Once again, select ‘No criteria—just execute the actions!’. Every time the record is updated, the ‘Molecule Search Terms’ field, in our example, will be updated with the current values from the fields specified in the formula.
Step 4: Once the fields and process are in place, add the search term field to your lookup search layout. In the search results, your users will be able to see the field values that the Process added to the custom search field.
This workaround will make the Salesforce lookup field better for your users by allowing them to search on both text and other field types.