You need to sign in to do that
Don't have an account?
Amol Jadhav 34
The above SOSL works fine, but find 'Barr' in all contacts not only in 'Test_View', as documentation it should search only in 'Test_View'.
SOSL on ListView not working as expected in Apex
List<List<SObject>> searchList = [FIND 'Barr' IN ALL FIELDS RETURNING Contact(Id, Name USING ListView=TestNamespace__Test_View ORDER BY Name ASC)]
The above SOSL works fine, but find 'Barr' in all contacts not only in 'Test_View', as documentation it should search only in 'Test_View'.
Hi Devi,
I have found the solution:
Using above SOSL 'Barr' will only be searched in 'TestNamespace__Test_View' not in all contactsAll Answers
I tried this in my org.Looks like this is an issue in salesforce.
When executing in query editor i am getting correct results.When i am executing from anonymous window getting records which are not in the list view also.
Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.
Thanks and Regards
Hi Devi,
I have found the solution:
Using above SOSL 'Barr' will only be searched in 'TestNamespace__Test_View' not in all contacts