Skip to main content

#NPSP TDTM0 人がディスカッション中

***reposting from another TB group to see if it gets better answers here**

 

Summary of Issue

  • I received an Apex trigger error email when trying to create a lead as a Guest User from my Experience Cloud Site using the OOTB 'Lead Form' component in the Experience Builder.

EMAIL ERROR MESSAGE

npsp.TDTM_Lead : npsp.TDTM_Lead: execution of BeforeInsert caused by: line 33, column 5: Variable does not exist: TDTM_Config_API

 

Troubleshooting steps already taken

Additional context/details

  • I have implemented a 'Create a Lead' Form component in my Experience Cloud Site for Unauthenticated Guest Users. I mapped the required field and some other fields within the component from the Experience Builder.
  • I configured all the necessary S&S / permissions and other setup steps needed, then published the site.
  • We have NPSP installed.
  • The Experience Cloud Site with the Lead From is for Guest Users to create Leads.

#Experience Cloud #Forms #Leads #NPSP #Triggers #NPSP TDTM #TDTM

2 件の回答
  1. 2023年9月1日 23:45

    TDTM_Lead is actually an Apex trigger.  But you are correct, there are no out-of-the-box TDTM handlers for the Lead object.  The TDTM_Config_API class is not a TDTM handler itself, it's more of a dispatcher to the specific TDTM handlers.

     

    It sure feels like an object permissions error, even though you say you've set all the correct permissions.  You should not need to set permissions on the Apex triggers / classes since those are running in system context already.

0/9000

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

8 件の回答
  1. 2020年12月9日 21:11

    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!

0/9000
I've refactored an org to use NPSP TDTM instead of standard triggers. I'm hitting CPU timeouts and SOQL query limits that weren't being hit before, despite not changing any of the underlying logic. I'm wondering, since for standard and NPSP objects the trigger originating the transaction is inside the NPSP namespace, if all of the code outside that namespace is adding its governor limits usage to the NPSP namespace's limits.
5 件の回答
0/9000