Announcement

Collapse

Information Needed

See more
See less

Apex Class "Maintenance_SelfHealing" causing Trigger Errors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apex Class "Maintenance_SelfHealing" causing Trigger Errors

    After working with Salesforce to resolve some errors we are receiving, the issue has been narrowed down to your Apex Class "Maintenance_SelfHealing".

    Here are the error messages:

    Apex script unhandled trigger exception by user/organization: 0052I00000DeEzC/00DF00000006xCG
    npsp.TDTM_Opportunity: execution of AfterInsert

    caused by: System.DmlException: Update failed. First exception on row 0 with id 0062I000014w5QXQAY; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunityTrigger_TDTM: execution of AfterUpdate

    caused by: System.NullPointerException: Attempt to de-reference a null object

    ()

    : []

    Class.npsp.UTIL_DMLService.updateRecords: line 202, column 1
    Class.npsp.TDTM_TriggerHandler.processDMLAllOrNoth ing: line 299, column 1
    Class.npsp.TDTM_TriggerHandler.processDML: line 278, column 1
    Class.npsp.OPP_OpportunityContactRoles_TDTM.run: line 81, 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_Opportunity: line 33, column

    And

    Apex script unhandled trigger exception by user/organization: 0052I00000DeEzC/00DF00000006xCG

    OpportunityTrigger_TDTM: execution of AfterUpdate

    caused by: System.NullPointerException: Attempt to de-reference a null object

    Class.OpportunityTriggerHandler_TDTM.handleUpdateG LAccountCode: line 1619, column 1
    Class.OpportunityTriggerHandler_TDTM.handleAfterUp date: line 2286, column 1
    Trigger.OpportunityTrigger_TDTM: line 28, column 1



    We sent this issue to C&P support and they said:
    The error appears to be caused by a field being deleted in the Opportunity. The Self Healing function in the Maintenance section of C&P will attempt to repost transactions that encounter an error, which in this case will cause the error to appear multiple times.


    And they said this:
    The error is being caused by the Apex triggers which are outside of our applications. The errors may be populating due to the Self Healing function attempting to repost the transaction multiple times Disabling the Self Healing option will stop it from attempting to re-post the transaction, but the cause itself are the triggers.

    To disable the Self Healing function in Salesforce:

    1.Login to your Salesforce instance
    2.Access C&P Settings from the App Launcher
    3.Click on Maintenance
    4.Uncheck the box next to "Auto re-process C&P Data errors"


    The question they couldn't answer was this, what are the ramifications of disabling the trigger? When I asked I was told to post here.

    Thank you,
    Tracey
    Last edited by TraceyTatum; 05-20-2020, 09:01 AM.

  • #2
    Good day @TraceyTatum

    Sorry for the trouble. Would you please grant us login access to your instance so that we can review it?
    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      Access granted.

      Comment


      • #4
        Hi Tracey,

        The ramifications of turning off self-healing are that more transactions may encounter problems and never complete populating the "native" objects of Salesforce (that is, Contacts, Opportunities...)/

        You can review the ones that fail to finish processing by going to the C&P Data tab and changing the view to "Errors". There is a field on the C&P Data record called "message" that will include the error that was generated when the transaction attempted to process.

        Sometimes errors are generated because creating the opportunity triggers other automations, especially with NPSP, that will access the record and keep it locked when C&P PaaS needs to come back and update it with Custom Mappings. In these cases, the Self Heal will often fix the problem, because when it is on, it will attempt to reprocess, and the second time around, there might be no conflict.

        In this case, though, reprocessing is just recreating the same response. The error suggests that maybe someone set up a mapping in C&P Settings > Custom Mapping, and then deleted the field on the Opportunity that the value was supposed to map to.

        We will review you account to see if we can provide more detail.

        Last edited by CnP.LiveSupport.AB; 05-20-2020, 03:54 PM.
        Regards,
        Click & Pledge Support Department

        On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

        Join us @ the educational webinars: https://clickandpledge.com/webinars/
        Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
        Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

        Comment


        • #5
          TraceyTatum ,

          I've been looking over the transactions that have been getting this error. Given the SKU and Custom Questions in the transaction, I have yet to find what triggered automation, ours or NPSP
          s, could be causing this error. I do know that all the transactions that have been sent to that Campaign have gotten the same error when trying to create the Opportunity. They all have SKUs of "Nominee", but there are no rules set up to respond to the SKU being "Nominee"

          What Opportunity record-type should this kind of transaction be? There is no C&P Setting > Opportunity > Record-Type rule that would apply here, but generally speaking, it seems they should be assigned an Event Registration record type.

          We will continue to investigate.

          Regards,
          Click & Pledge Support Department

          On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

          Join us @ the educational webinars: https://clickandpledge.com/webinars/
          Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
          Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

          Comment


          • #6
            I went to C&P Settings > Custom Mapping and checked all the fields that were referenced. The only one I have a question on is for the Account object. The Record Type ID field is a formula field--is it able to be used in the way the C&P mapping dictates?

            Thank you!
            Tracey

            Comment


            • #7
              I looked up "Nominee" and it should be mapped to C&P Coupon Code. (Record Type is Event Registration).

              Comment


              • #8
                Tracey,

                We determined that the problem was corrected by setting the value for Campaign Type to "Conference", matching the same campaign for last year. Although I am confident it was the actions that NPSP takes when a new Opportunity is created that blocked PaaS from completing Opportunity creation, I did not think this was likely to happen with default NPSP settings. Your login did not allow me to review the NPSP Customizable Rollups to see if there was one related to Campaign Type, but you may want to relay what happened to Ethan Waller, so he can review.

                Good luck with your campaign! Amanda
                Regards,
                Click & Pledge Support Department

                On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

                Join us @ the educational webinars: https://clickandpledge.com/webinars/
                Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
                Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

                Comment

                Working...
                X