You need to sign in to do that
Don't have an account?
Compile Error: Unexpected token ')'. at line 25 column 26
Hi, I have this error on my code:
public class Search_For_User { String keyword; List<user>results = new List<user>(); public String getkeyword(){ return keyword; } public List<user> getresults(){ return results; } public void setkeyword(String input){ keyword = input; } public PageReference searchUser(){ results = (List<User>)[FIND :keyword IN NAME FIELDS RETURNING USER(FirstName, LastName, ProfileId)][0]; return null; } System.debug(results); }Can someone help me please...
All Answers
You need to add System.debug() inside the method. Outside the method it will be treated as a constructor. Try the below code:
Hope this will solve your problem. If does, then mark it as the best answer so it will also help others in the future.
Many Thanks,
Sunil Rathore