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
sldringsldring 

URGENT HELP - Limit Exceeded

I am getting this exception when I am trying to retieve ID from "Accounts" tab in Salesforce.

"System.Exception:EXCEEDED_ID_LIMIT: retrieve id limit reached"

Please can someone guide me thru the reason why this error is coming and also the work around.

 

SuperfellSuperfell
You passed in to many Ids, you need to batch them up into sets of 500.
margotqmargotq
Can someone provide some working C# sample code for batching? I have run into this problem as well (with the 2000 record limit), and I'm running into issues with array management.

Thank you,
Margot
DevAngelDevAngel
Hi margotq,

Throw out a scenario or two and the sample will make more sense.
margotqmargotq
OK,

I am trying to update my local database with all changes that have been made to pricebook entries since a certain date/time. I am using the 'getUpdated' call, which is returning a set of 3500 records. I then am passing the array returned from 'getUpdated' directly into the 'retrieve' call.

My code works fine if the set is less than 2000, but I have now learned that 'retrieve' has a 2000 record limit. My experience with arrays is limited, so everything I have tried to try and "batch" the 3500 records into smaller groups of 2000 and 1500 is failing.

I was hoping that someone who has implemented batching had a simple code example that I could start from.

Thanks for your help,
Margot