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
LeaseWorksDevLeaseWorksDev 

SOSL Bind Variable Stopped working

Code that has stopped working:

---
soslQuery = 'FIND :searchString IN NAME FIELDS RETURNING '
+ typeObject +'(Id, '+nameField+ ' where ' +prefix+filterType+ ' = \'' +filterValue+ '\' ORDER BY '+nameField+') LIMIT 20';
List<List<SObject>> results = Search.query(soslQuery);

---
If we replace the query like the below, it is returning results.

soslQuery = 'FIND \'*' + searchString + '*\' IN NAME FIELDS RETURNING '
+ typeObject +'(Id, '+nameField+ ' where ' +prefix+filterType+ ' = \'' +filterValue+ '\' ORDER BY '+nameField+') LIMIT 20';

SOSL is not honoring the values in the bind variable from today.
LeaseWorksDevLeaseWorksDev
Just to be clear - The query with the bind variable just stopped returning any results. It is not throwing any errors.
TSMETSME
Did you find out in the end what causes this, as we experienced exactly the same problem?  
See https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005ic5QAA 
No other solution yet as the concatenation workaround.

Regards,
Thomas