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

Does pattern support Bulk DML retries when allOrNothing=false? #1

Open
cropredy opened this issue Jun 1, 2016 · 0 comments
Open

Does pattern support Bulk DML retries when allOrNothing=false? #1

cropredy opened this issue Jun 1, 2016 · 0 comments

Comments

@cropredy
Copy link

cropredy commented Jun 1, 2016

I think this is true after inspecting your trigger pattern. Looking for verification and suggesting you add to your documentation.

If doing a bulk DML operation such as Database.insert(sobjList,false), per the Apex documentation, if some records fail, Apex will attempt a second and possibly third retry on the failing sobjects.

You would not want the trigger recursion static variables to be remembered for the second or third retry as otherwise the retry logic will not execute one's trigger handler business logic.

I believe your pattern addresses this because on a retry, per the doc, the trigger refires which means the xxxObjectTriggerHandler will be reinstantiated for the retry set and thus reset the isXXXXFirstRun booleans.

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

1 participant