You need to sign in to do that
Don't have an account?

searchResults class Query
Hi All,
We have a custom search configured on case object which uses the searchresults class to look for the value entered by user in certain fields.
Search.searchResults searchResults = search.find('FIND "string in ALL FIELDS RETURNING case(id,number......where record type Id=:recid)');
When I enter last 5 characters of the case number, results dont come up but when I enter 6 charcters it comes up. Is there any pattern how this search works ? Can any one explain ?
Thanks
Natraj
We have a custom search configured on case object which uses the searchresults class to look for the value entered by user in certain fields.
Search.searchResults searchResults = search.find('FIND "string in ALL FIELDS RETURNING case(id,number......where record type Id=:recid)');
When I enter last 5 characters of the case number, results dont come up but when I enter 6 charcters it comes up. Is there any pattern how this search works ? Can any one explain ?
Thanks
Natraj
You need to use WILDCard Search to get your results with 5characters to work.
like this
FIND {My*}
Please follow below link
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_find.htm
Thanks
Ramesh
*Please mark this as best answer if it was helpful*