You need to sign in to do that
Don't have an account?
Gauri Gaikwad 13
How to count number of records in SOSL query
SOSL query: i want to count number of records of .com in account, leads, opportynity object
FIND {.com}, count()
IN ALL FIELDS
RETURNING Opportunity(AccountId), Lead(company),Account(Name)
FIND {.com}, count()
IN ALL FIELDS
RETURNING Opportunity(AccountId), Lead(company),Account(Name)
I dont think we can use Count() in sosl query. Instead you have to count the size of each object and add them to find the total returned records in apex as shown below.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
I dont think we can use Count() in sosl query. Instead you have to count the size of each object and add them to find the total returned records in apex as shown below.
If this solution helps, Please mark it as best answer.
Thanks,