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
pcavepcave 

Apex governor limits

Hello, I'm doing some intergartion work through the salesforce api and I recently got the following warning.

 

Operation: insert.npe03__Recurring_Donation__c

By user/organization: 00580000001snmg/00D80000000cnJ5

Caused the following Apex resource warnings:

npe03:Number of DML rows: 128 out of 200

 

I'm not really sure what this means as I know I'm not doing 128 inserts at once.

 

Does the 200 limit apply to a certain timespan?

 

Any help is appreciated. 

 

Thanks,

Phillip

Best Answer chosen by Admin (Salesforce Developers) 
sandersensandersen

This trigger is part of the nonprofit starter pack. The recurring donations functionality creates Opportunities when you insert Recurring Donation objects. Because many Opportunities can be created for each Recurring Donation, the code can't be made to completely bulk-safe. That is, if you create 200 Recurring Donations, and each of them create 12 Opportunities, you will run up against governor limits. It's one of our known issues for this package.

 

The work around for this is to work in batch sizes less than 200. Find a size that works for you based on how many Opportunities are getting created.

 

 

Hope that helps,

 

Steve