You need to sign in to do that
Don't have an account?
Balakumar Ramachandran 6
List error
want to get the list of users returned in Username method query..how do i get it??
public class WV_ManualShareRead {
List<Scheme__Share> users;
List<User> userName;
public List<User> getUserName()
{
if(userName == null)
userName = [SELECT Name FROM user WHERE id = :users];
return userName;
}
public List<Scheme__Share> getUsers() {
if(users== null)
users= [select UserOrGroupId from Scheme__Share where ParentId= :ApexPages.currentPage().getParameters().get('parentId')];
return users;
}
}
public class WV_ManualShareRead {
List<Scheme__Share> users;
List<User> userName;
public List<User> getUserName()
{
if(userName == null)
userName = [SELECT Name FROM user WHERE id = :users];
return userName;
}
public List<Scheme__Share> getUsers() {
if(users== null)
users= [select UserOrGroupId from Scheme__Share where ParentId= :ApexPages.currentPage().getParameters().get('parentId')];
return users;
}
}
You'll need to iterate the users list, pull the UserId from the records and store them in a list, then bind that list into your query, That way you will be retrieving with valid user ids.