You need to sign in to do that
Don't have an account?
DennoP
I get the error "Inline query has too many rows for direct assignment, use FOR loop"
While I am trying to display a list of records in a data table I get the following message:
Inline query has too many rows for direct assignment, use FOR loop.
Can anyone tell me how could I amend the controller below to use the FOR loop to handle the result.
public List<Appointment__c> getVisits(){
return [SELECT id, Assigned_To__c, Time_Band__c, Visit_Date__c, Visit_Type__c
FROM Appointment__c
WHERE Assigned_To__c = 'a0AR0000000UJBI'];
}
Any help is appretiated.
Inline query has too many rows for direct assignment, use FOR loop.
Can anyone tell me how could I amend the controller below to use the FOR loop to handle the result.
public List<Appointment__c> getVisits(){
return [SELECT id, Assigned_To__c, Time_Band__c, Visit_Date__c, Visit_Type__c
FROM Appointment__c
WHERE Assigned_To__c = 'a0AR0000000UJBI'];
}
Any help is appretiated.
Thanks for the help.
:manhappy: