Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we handle Trigger exception when max loop count exceeded? #21

Open
vinodpalne opened this issue Nov 17, 2019 · 2 comments
Open

Comments

@vinodpalne
Copy link

How can we handle Trigger exception when max loop count exceeded?

@MParrella823
Copy link

Interested in this also ^

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!

@TiagoNeve
Copy link

How about this?

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());
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants