One can’t persist more than 200 records in one web service call using Salesforce Partner calls like create()/update()/upsert(). You will stumble upon this error on such attempts
“EXCEEDED_ID_LIMIT: record limit reached. cannot submit more than 200 records into this call”
The solution to this is to use a batching mechanism as described in the Salesforce Cookbook here : http://wiki.developerforce.com/index.php/Batch_records.java. This batching recipe code sample is giving simple abstraction to batching for update/create calls and is really easy to port to your production app, because its not dramatically changing the code design.
Transparent Batching available in Tolerado for WSC !
I thought Tolerado for Salesforce WSC should also make best use of this delicious Batching recipe. So, the same Batch_records.java batching is ported to Tolerado PartnerStubs. Here are highlights of this port :
- Batching available to all create()/update() and even upsert() calls.
- Batching is made available transparently. Being transparent here means, client code using ToleradoPartnerStub will not change at all, “batching will come into play automatically if number of records are more then 200”
Updated Tolerado Jars are available in download area.
For those who want more fine technical details on batcher implementation, please check these classes:
- AbstractPersistanceBatcher.java : Basic fixture for batching
- AbstractSaveUpdateBatcher.java : Abstract extension on basic fixture for create/update calls.
- CreateSobjectsMethod.java : Concrete batcher implementation of Partner create() call.
- UpdateSobjectsMethod.java : Concrete batcher implementation of Partner update() call.
- UpsertSobjectsMethod.java : Concrete batcher implementation of Partner upsert() call.
- ToleradoPartnerStub : The Partner stub, that opens access to all upsert/create/update calls.
Your views ?
Would love to hear your views/suggestions/feedback on this !