You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like that you can specify how many times you'd like the trigger to execute, but adding a max loop count only results in a custom exception thrown vs a Salesforce exception. The result is still the same -- an unsuccessful commit to the database. Maybe I'm overlooking something here!
trigger LeadTrigger on Lead (before insert, after insert, before update, after update, before delete, after delete, after undelete) {
try {
new LeadTH().run();
}
catch(Exception e) {
System.debug('Exception e');
System.debug(e.getMessage());
}
}
How can we handle Trigger exception when max loop count exceeded?
The text was updated successfully, but these errors were encountered: