+ Start a Discussion
JoyceJoyce 

Record Count from API does not match count in Salesforce!

Does anyone know why a count from Salesforce QUERY API does not match the count from a Salesforce Report?  For example, in API we get 1634 case records.  When I run a Case report, I get 1736.  There are 99 records less in API.  Accounts is the same number or records, Leads is the same count, then for Contacts, there are 211 more from API.

We are using the Query API call

  • Select id from table.
  • QueryREsult result  = login.getBinding().query(sql);
  • System.out.printlin( table result.getSize()
darozdaroz
First thing that comes to mind:

Are the API and UI users the same? Perhaps one does not have permissions to some of the cases and thus cannot see them.
JoyceJoyce
Yes, same user.  It is an Administrator user
benjasikbenjasik
private sharing account model? Querying as admin or no?

Sounds like a good candidate to file a case, so we can better look at the org.