Search code examples
javasalesforcesoql

Salesforce SOQL returning wrong set


I am executing a SOQL and when I am firing

SELECT COUNT(ID) FROM Contact

then it's returning 12958 no of result set but when I am firing

SELECT LastName, ts2__Text_Resume__c FROM Contact

then only 890 results are coming, though size of result set in 2nd query is more then 4mb, so I am wondering why 2nd query giving lesser number of rows. Any help would be highly appreciated


Solution

  • We need to consider two JSON object nextRecordsUrl, done as well when we get response and once we check done is true then all result set has been fetched.