+ Start a Discussion

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. 




Best Answer chosen by Admin (Salesforce Developers) 

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,