You need to sign in to do that
Don't have an account?
Bob Lee 14
I am getting compilation error at line 25 column 26
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...
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...
Greetings to you!
You need to add System.debug() inside the method. Outside the method it will be treated as a constructor. Try the below code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com