I keep getting an error
Error: Compile Error: expecting a colon, found 'accountId' at line 11 column 36
Hotel_Acct__c is a lookup to Account ID so this should work. Already tried the SOQL query in Dev Console and it worked fine.
public class summRes
{
public Id accountId {get;set;}
public List<Reservation__c> getres()
{
List<Reservation__c> res;
oppty = [SELECT Contact__c, ClubID_in_Reservation__c, Name, Arrival_Date__c FROM Reservation__c
WHERE Arrival_Date__c = THIS_YEAR
AND Cancellation_Ref__c = NULL
AND ClubID_in_Reservation__c != NULL
AND Hotel_Acct__c = accountId];
return res;
}
}
Thanks in advance.