• Stephen Eller 6
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am confused as to why a SOQL query against a custom object is only returning the first 150 rows when it should be returning up to the governor limit (50,000). Does anyone have any ideas why my query is being limited?

Here's my controller method:
@RemoteAction
public static List<Metro__c> getAllMetros(){
    String query = 'SELECT Id, Name, state__c FROM Metro__c ORDER BY Name';
    List<Metro__c> r = Database.query(query);
    System.debug('r='+r.size());
    return r;
}
When i look at the debug I see:
10:48:27:237 USER_DEBUG [54]|DEBUG|r=150

There are several thousand records in the Metro__c object. Any insight into this would be appreciated.