function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sean Fife 9Sean Fife 9 

QueryOptions seem to be ignored with queryAll

I have this code (C#, .NET 4.5), which is pretty much the Salesforce sample: https://www.salesforce.com/developer/docs/api/Content/sforce_api_calls_queryall.htm
 
service.QueryOptionsValue = new QueryOptions();
service.QueryOptionsValue.batchSize = 500;
service.QueryOptionsValue.batchSizeSpecified = true;

QueryResult qr = service.queryAll(selectString);
The service variable is an SforceService object with Enterprise API version 33.0, and every time I run it, no matter what object I query, I always get 200 rows back and not 500.

Is there some setting you have to set elsewhere so it won't ignore the batch size?  Or is this just wrong?
Best Answer chosen by Sean Fife 9
Sean Fife 9Sean Fife 9
Asked too soon.  "no matter what object I query" was in incorrect statement.  I found one that worked.

Turns out the objects I was trying to query were custom objects that are managed and apparently tied to an older API version that doesn't support more than 200 records at a time.