Loading

Make Salesforce Additional Fields Searchable

Publiceringsdatum: Jun 12, 2025
Beskrivning

Search relies on indexing to return relevant records. A limited set of fields and types are indexed for search on each individual object by default and are outlined in the following documentation:

Salesforce Classic -  Searchable Fields by Object in Salesforce Classic

Lightning - Search Manager shows you a list of available searchable fields in your org

Lösning

Since fields of type Text for custom objects are always indexed for search, an administrator may consider creating a custom text field and populating it with a value or data contained in another field (that's not indexed by default) via a flow.

For example, say users want to see Contacts related to an Account by searching Account Name as outlined in article Cannot see all Contacts associated to an Account when I search for Account Name or perhaps users would like to find related Opportunities by searching Account Name or for records containing a particular picklist field's value or other field type that's not typically indexed for search by default.


Note: Before considering this as a potential solution you should evaluate the specific use case or requirement behind the request from users. This is important because populating a large number (several thousands) of records with identical field values may not be scalable solution from a search standpoint due to implications of search crowding or truncation as outlined in the Help Users Find Missing Records documentation.

Evaluate whether search filters as an example, may be a suitable alternative to help users narrow down results and find relevant records as outlined in the Configure Salesforce Search documentation.
 

1. Create a custom text field on the object that you're searching records. Since this field will only be used for searching purposes, don't add the field to your Page Layouts.

2. Create a Flow with the following criteria to update your custom text field with the value that you wish to search for. See Build a Flow for more details.
 

  • Select Record-Triggered Flow

 

  • Trigger the Flow When: A record is created
 
Optionally, set desired Condition Requirements or chose the default value of None to have the flow run each time any record is created or edited.

 

  • Optimize the Flow for: Actions and Related Records.

 


3. Add an 'Update Records' Element to the Flow.
 
  • Populate your desired Label.

 

  • How to Find Records to Update and Set Their Values: Use the <Object> record that triggered the flow.
 
Optionally, set desired Filter Conditions or use the default value of: None--Always Update Record.

 

  • Set Field Values for the <Object> Records

Field: Choose the custom field you created in step 1.

Value: Click into the lookup field, select $Record | Choose the field you'd like to make searchable.

 

 4. Save your flow and choose a Flow Label and select to Activate.
 

Lastly, you will need to update the newly created text field for all existing records. See Mass update records in Salesforce and How to retroactively trigger workflow on already existing records? for more details.

If users are still unable to locate desired records see Unable to find records in global search for additional troubleshooting recommendations.

Knowledge-artikelnummer

000382100

 
Laddar
Salesforce Help | Article