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
SaaniaSaania 

Getting 'EXCEEDED_ID_LIMIT: record limit reached' error on binding.create()

Hi,

I am creating a piece of code that adds campaign members to selected campaign via a UI in VC#.

the Campaign can have many members (obviously more than 200 in most cases), when I use binding.create() method to create an instance (or even an array) of CampaignMember object(s), I get an error ...

'EXCEEDED_ID_LIMIT: record limit reached. cannot submit more than 200 records'

Any suggestion for a work around would definately help.

Thanks,
Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
break your array up into multiple arrays of 200 and call create multiple times.

All Answers

SuperfellSuperfell
break your array up into multiple arrays of 200 and call create multiple times.
This was selected as the best answer
SaaniaSaania
it worked ... thanks SimonF