• Richard Cua
  • 0 Points
  • Member since 2008

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

Hi All,

This is the scenario we are working with and are having an issue looking for a solution.

I am trying to retrieve more than 1000 records in an Apex Query and apparently 1000 is the upper limit to the number of records that can be retrieved.

Dose any one know of a query more in a trigger or how to implement this. 

Below is the query:

for (Lease_Com__c[] leaseCommission :

[select Id, lease_nbr__r.Name, gcp_amt__c, lease_nbr__r.End_User__c, lease_nbr__r.Funded_Dt__c from lease_com__c

where OwnerId = :UserID

and lease_nbr__r.Funded_Dt__c < :dtBeginningOfNextMonth

and lease_nbr__r.Funded_Dt__c >= :dtBeginningOf6MonthsPrevious

order by lease_nbr__r.Funded_Dt__c desc] ) {


Vivek Viswanathan