I'm running into an issue using DLRS to roll up an Account Soft Credit field onto Opportunity that appears to be TDTM related. It looks like the NPSP trigger is failing due to something currency related when I try to deploy the DLRS trigger.
There are a number of Account Soft Credit records that already exist (i.e. they are being created ok, just hitting a problem w/ DLRS trigger). Suggestions welcomed.
Error message:
dlrs_npsp_Account_Soft_CreditTest.testTrigger System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, npsp.TDTM_AccountSoftCredit: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object Class.npsp.OPP_AccountSoftCredit_TDTM.synchronizeCurrencyIsoCode: line 88, column 1 Class.npsp.OPP_AccountSoftCredit_TDTM.run: line 57, column 1 Class.npsp.TDTM_TriggerHandler.runClass: line 193, column 1 Class.npsp.TDTM_TriggerHandler.run: line 113, column 1 Class.npsp.TDTM_Config_API.run: line 92, column 1 Trigger.npsp.TDTM_AccountSoftCredit: line 33, column 1: [] Class.dlrs.RollupService.testHandler: line 282, column 1 Class.dlrs_npsp_Account_Soft_CreditTest.testTrigger: line 11, column 1
Thanks for the group link, didn't realize that existed. Apparently there is a whole article on issues deploying triggers and that it's not that uncommon for them to fail. I dug into the debug log and realized for some reason it's failing to create an Account in the test class for some reason (missing a name, can find that in the debug log); possibly due to order of operations with NPSP triggers or something else. The recommended workaround is to edit the test class in sandbox to provide the missing value(s), then deploy to production rather than letting the app handle it for you. I haven't done that yet but will try to remember to post an update when I get to it.
So—not perhaps directly related to NPSP, but not totally unexpected when there's a lot of other automation in the org (i.e., NPSP). I have no idea if the currency thing is the difference between this org and the ones where it works, but it's another layer of "stuff" that could possibly create an issue (like, maybe the DLRS test class doesn't set a default currency??).
Anyways - still in progress. Thanks for the ideas, if adding Account Name to the test class fixes it I will post for reference!