String query = 'FIND \'*' + searchString + '*\' IN ALL FIELDS RETURNING Ticket__C (Region__r.name, Manager__c, Manager__r.name, Name, Notes__c), user(id,Name)'; 

I am searching with user name and results are zero.

Aim: when a string is entered, it should match with any of the fields and display the results. with the above query, it will match only with Ticket.name and shows zero results when i am searching for the user.name.

Says IT CAN NOT BE DONE. So how to achieve If input is a user name, they should be able to see ticket records related to the user, which I am displaying on visualforce page.

any inputs please


This is what I did. String query = 'FIND \'' + searchString + '\' IN ALL FIELDS RETURNING Ticket__C (Region__r.name, Manager__r, Manager__r.name, Name, Notes__c), user(id,Name)';

Manager__c is a Lookup(User).

Ticket__c[] searchTickets= (Tickets__c[])searchList[0];

User[] searchUser = (User[])searchList[1];

in for looping user(){

if(user.id == manager id in ticket){

addTolistToDisplay.add(ticket__c object);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.