diff --git a/RemoteTKController.cls b/RemoteTKController.cls index 859cd3a..6c0661f 100644 --- a/RemoteTKController.cls +++ b/RemoteTKController.cls @@ -280,9 +280,11 @@ public class RemoteTKController { @remoteAction public static String search(String sosl) { - List> result; + List result = new List(); try { - result = Search.query(sosl); + List> searchResults = Search.query(sosl); + for(List sr : searchResults) + result.addAll(sr); } catch (QueryException qe) { return makeError(qe.getMessage(), 'INVALID_SEARCH'); } catch (SearchException se) {