Count more than 50000 records in salesforce


Using AggregateResult  Integer intCount = 0; for(AggregateResult result :[SELECT COUNT(Id) intVal FROM Custom_Object__c]) { intCount+=(Integer)result.get(‘intVal’); } System.debug(̵…

Source: Count more than 50000 records in salesforce

Advertisements