You need to sign in to do that
Don't have an account?
StandardSetController with Database.QueryLocator Problem - Is this a Bug?
Well Not sure if anybody else has faced this isuse ...
I'm facing it right now ...
I'm using this kind statement to Populate StandardSetController instance:
ApexPages.StandardSetController setCtrl = new ApexPages.StandardSetController(Database.getQueryLocator([Select ID, Account__c, Contact__c, Contact__r.AccountID From Matter__c]));
setCtrl.setPageSize(400);
Now if Query Returned records then it works fine. But if Query doesn't return records then when i access records using this statement:
setCtrl.getRecords() - This returns ALL records, if QueryLocator is Empty from the query used. Why is this So happening, I think If it is Empty then It Should return 0 records not All records ... :( ...
All Answers