When you do a SOSL query - the result is in the form of multiple lists (one for each object you search).
List<List<sObject>> resultsList = [FIND 'test' IN NAME FIELDS RETURNING Object__c(Id,Name) limit 10];
The line above does the SOSL query and now we have results in the "
My problem is now getting those results into a simple "
When I try to assign the results like this, the list is always empty/null:
simpleList = ((List<Object__c>)resultsList);
I've also tried assigning in array format, but always blank still, also tried using a for loop to iterate through the "
resultsList" and add to my simpleList, but no dice.
So even though the SOSL query is definitely returning results, the list is always empty.
Anyone have any ideas? Thank you!