Salesforce - the query returns only 500 rows, if more exists

First of all, I am not the one who is developing this, but I am the one who has an SO account. My SF knowledge is almost non-existent.

Basically the problem is that the query returns only 500 lines from our PHP script. However, when we substitute this query (directly in PHP) for others, this query returns more than 1,500 rows. There are definitely more than 500 rows that should be returned by the first request - I checked the use of the data explorer.

Here is the first request:

SELECT Id,WEBSITE_ExternalId__c,Name, ............. from Account 

And here is the second:

 SELECT Id,WEBSITE_ExternalId__c,D_STANDARD_Age__c, .............. from Feedback__c ORDER BY CreatedDate ASC 

Any clues? I appreciate that this may not be enough, but I know little about Salesforce. If you need anything else to answer, ask and I will see what I can do.

+4
source share
2 answers

For great results, the results will be processed by calling the request, you will get so many lines, as well as a token that you can use to get the next batch and so on. as a result of the query, there is a done flag that indicates whether this is the last batch in the results or not. if false, you need to call queryMore, passing in queryLocator (also returned in the queryResult structure). See Documents / examples at query / queryMore .

+3
source

Make sure you use the latest WSDL from Setup> Develop> API and make sure that WSDL caching is disabled in the PHP settings: https://help.salesforce.com/apex/HTViewSolution?id=786331&language=en .

Also, as mentioned in the manual, 500 default results for query objects. In addition to using queryMore () for large calls, see the documentation for setting batch size: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_changing_batch_size.htm .

-1
source

All Articles