You need to sign in to do that
Don't have an account?
sfdcchampions
SOSL in Apex controller
Hi Forum members,
I am trying to use SOSL in my Customcontroller class,please help me using that cause the concept is not much clear to me .
I am currently queing data through SOQL.that i have to upgrade to SOSL
I have to fetch data from a custom object say "obj__c".
so the code is :-
-------------------
String namevalue = 'Mathew' ;
String statevalue = 'GA' ;
String typevalue = 'VIP' ;
List<List<SObject>> searchList = [ FIND :namevalue IN NAME FIELDS RETURNING obj__c(Id,Name,Room WHERE State__C like :statevalue AND State__C like Type__C:typevalue )];
I am not able to understand this query completly:-
1). This query will fetch me records where the 3 condition met
2). What if i also heve to retrieve child records of this master object in a single go.
3). I have to fetch relational values also like : - address__r.name etc s where to specify them
4). [ Select Id,Name,(Select Name,Date, From ChildObject__r)from obj__c ] HOW to convert this query in SOSL
Please suggest and help
Thanks