function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfunstonsfunston 

Trigger Failure

Hi, can someone tell me what happens when a trigger fails?  I have a requirement to report the failure to my users.

Thanks
jyotijyoti

If there is an error executing the trigger, the creator of the trigger usually gets an email with an exception similar to this:

 

Developer script exception from RetrieveInfoOnLead : RetrieveInfoOnLead: execution of BeforeInsert  caused by: System.StringException: Ending position out of bounds: 5  Trigger.RetrieveInfoOnLead: line 33, column 30

RetrieveInfoOnLead: execution of BeforeInsert

caused by: System.StringException: Ending position out of bounds: 5

Trigger.RetrieveInfoOnLead: line 33, column 30

sfunstonsfunston
Thanks jyoti.  I appreciate the reply.

I hope you can answer one more question.  I did a little reading since posting my question.  Can you confirm if this is correct?  I am thinking that I should be able to add a try catch statement and send an email to a different user if there is an error while processing the trigger.

Thanks again.