Skip to main content
1 of 2
Boris Bachovski
  • 16.3k
  • 8
  • 50
  • 88

As far as I can see, this would do the job:

[SELECT Id, Email__c FROM Project__c WHERE Criteria__c = :criteria ORDER BY Some_Date__c, External_Id__c DESC][0]

Boris Bachovski
  • 16.3k
  • 8
  • 50
  • 88