We are using Non profit starter pack 3.0 in a fresh new sandbox. We have a requirement to automatically convert leads to accounts, contacts and opportunities. Since we are using the NPSP 3.0 1 to 1 model, we ran into the following issues. 1. We created our own after insert lead trigger which uses database.lead convert class to do the automatic conversion for the lead. We ran into dml concurrent exception which happens because our trigger was inserting the lead and npsp trigger was firing dmls . So we created an asynchronous call using future method which resolved the issue. Is there a way to disable the npsp account and contact triggers or is there a specific database.convert class used for NPSP 3.0?
1 Answer
You can turn off/turn on, make async, and reorder triggers within the NPSP. There's not a custom convert class exposed outside of the package currently, but you should be able to get at what you need using the Table-Driven Trigger Management (TDTM) system.
These two links should help, the first one is an overview of how TDTM works, the second is a technical review of the implementation.
https://powerofus.force.com/articles/Resource/NPSP-Table-Driven-Trigger-Management-TDTM
http://developer.salesforcefoundation.org/#blog/post/2014/11/24/table-driven-trigger-management.html