You need to sign in to do that
Don't have an account?
Praveenchandu
Use where condition in SOSL for list of ids
Example select id from account where id iN:accList
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
https://salesforce.stackexchange.com/questions/7334/why-does-sosl-return-a-list-of-a-list-of-sobjects-in-apex/7336
Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.
Thanks and Regards
All Answers
You can write SOSL like this to serach for records in list of ids. Please refer below links which might help you further
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_where.htm
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_syntax.htm
Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.
Thanks and Regards
Thanks for ur help
but what I required is List of Id's from 2-3 objects using where clause in sosl and the values returned by these query should be added to the list and I should Query using soql ["select id from "any one object" where id in:"in the above list""].
Thanks And Regards,
Praveen Kumar
Thank you For reply the records returned by the above query should be added to one list.
I have gone through your question. Please try the query below -
For more information, go to the link below -
https://salesforce.stackexchange.com/questions/157565/using-sosl-with-where-clause
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
Thank you For reply the Id's returned by the below query should be added to the list and then I should perform soql query on the list i.e the id is present the list or not.
[FIND 'praveen' RETURNING Account(id WHERE IsImportant__c=true),contact(id WHERE IsPrimary__c=true)];
Thank You.
https://salesforce.stackexchange.com/questions/7334/why-does-sosl-return-a-list-of-a-list-of-sobjects-in-apex/7336
Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.
Thanks and Regards
Please try this -
//First get the list of lists returned by SOSL.
//Then separate all the lists for different objects.
//Then create a List of Ids and add Ids in it from all the lists.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com