You need to sign in to do that
Don't have an account?
KNK
Need Help on controller
Hi Team,
i want to write a control to retreive 3 user record which need to display in vf page . suppose these are the names say Vinay, Kumar and Ganesh. How can retrieve these users to vf page.
any guidance will be appreciated here.
String[] targetNames = new String[]{'Vinay', 'Kumar', 'Ganesh'};
List<User> myList = [Select Id, Name FROM User WHERE Name in :targetNames];
for(User u : myList){
System.debug(u.Id + '----' + u.Name);
}
You can easily expose the list to VF page.
List<User> myList = [Select Id, Name FROM User WHERE Name='vinay'];
then uae on page