You need to sign in to do that
Don't have an account?
help with super class/sub class to limit query
While at DF2011 I got some cool apex code for creating a VF page that creates a searchable account list and this was one of the controllers for that page -
public AccountListController() {
// TODO: call the parent class constructor with a base query
super('select Id, BillingCity, BillingState, RecordTypeId, Owner__c, Name from Account');
pageSize = 50;
I am wondering if there is a way to add a "where" clause to the above. I have tried several difffent ways to limit the query but have not been successful.
here is the ending of the code:
}
// cast the resultset
public List<Account> getAccounts() {
// TODO: cast returned records into list of Accounts
return (List<Account>) getRecords();
}