0

Region__c is the self lookup on Agent__c. One region have many agents. When searchString = region name, it displays only one record.

I want to display all Agents in that region. How to achieve this?

String searchquery = 'FIND \'*' + searchString + '*\' IN ALL FIELDS RETURNING Agent__c (Region__c,Region__r.name, Manager__c, Manager__r.name,Name), user( id, Name) limit 1999'; 
0

1 Answer 1

1

I create Agent custom object and self lookup field name Region. Below query is working fine for me and giving expected results -

FIND {test} IN ALL FIELDS RETURNING Agent__c (Region__c,Region__r.name, Name)

Here test is the name of record.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .