developerforce / Force.com-JavaScript-REST-Toolkit

ForceTK - a minimal Force.com REST API for JavaScript apps
BSD 3-Clause "New" or "Revised" License
315 stars 175 forks source link

Force.com REST API batchSize #91

Open ghost opened 7 years ago

ghost commented 7 years ago

Hey guys,

I was running some SOQL queries and noticed that even though I set a limit of 1000 it still returns records at a max of 250 at a time. I'm not aware of anything from the org side that is setting this, so was looking at the REST API Developer Guide and found the Query Option Header.

I've added this into the Client.ajax beforeSend: xhr.setRequestHeader('Sforce-Query-Options', 'batchSize=1000'); but it doesn't seem to affect the returned records batch size at all.

Any ideas?

appitekltd commented 7 years ago

Hey,

We are also having this issue, we are setting a LIMIT of 500 on our queries, Account query returns all 500, but Contact or Lead query returns in batches of 200.

We are not setting a Sforce-Query-Options header, and when we do it does not affect the the result.

If we set an OFFSET with the LIMIT 500, Account gives us 500, but Contact just gives 200, and also says that it's done (no query more URL)

Anyone know why this would be happening?