Loading

Salesforce Lightning Global Search Does Not Return Results for Trailing Substrings in Text Fields

Дата публикации: Apr 2, 2026
Описание

In Lightning Experience, search results depend on how field values are tokenized (broken into searchable terms) during indexing. Because of this, searching using certain substrings—especially from the end of a text value—may not return expected results.

For example, consider a Product record where the Product Code field contains:
ABC-EFG-PQR-XYZ

Salesforce breaks this value into tokens such as:

  • ABC
  • EFG
  • PQR
  • XYZ

Searching using any of these tokens returns expected results. However, substrings from the end of the value (for example, PQR-XYZ) are not indexed as tokens and therefore do not return results.

Additionally:

  • Searches using substrings from the beginning (for example, ABC-EFG) may work due to implicit wildcard behavior (for example, ABC-EFG*).
  • Salesforce does not support leading wildcard searches (for example, *PQR-XYZ), which prevents matching substrings from the end of a value.

Note:
This behavior may differ from Salesforce Classic, where similar searches can sometimes return results.

Решение

This is expected behavior based on how Salesforce search indexing and tokenization work in Lightning Experience.

To improve search results:

  • Search using complete tokens (for example, ABC, EFG, PQR, XYZ).
  • Avoid searching using substrings from the end of a field value.
  • Use consistent naming or formatting conventions to make key terms easily searchable.
Номер статьи базы знаний

005225668

 
Загрузка
Salesforce Help | Article