You need to sign in to do that
Don't have an account?
Haystack Certified
Will savepoint prevent exceptions in triggers from rolling back the entire transaction
Suppose there is a trigger where I don't want exceptions to rollback the entire transaction. Can savepoints help here? i don't want to suppress any errors by wrapping a try/catch around everything. if the trigger gets to a certain point, then the transaction should save regardless of downstream exceptions.
All Answers
Please find the below information which is related to same topic.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_transaction_control.htm
http://www.infallibletechie.com/2013/02/what-is-databasesavepoint-in-salesforce.html
http://salesforce.stackexchange.com/questions/9905/is-manual-database-setsavepoint-and-rollback-needed-on-trigger-exception?rq=1
http://th3silverlining.com/2009/06/15/salesforce-savepoints/
Please do let me know if it helps you.
Regards,
Mahesh
The optional allOrNone parameter specifies whether the operation allows partial success. If you specify false for this parameter and a record fails, the remainder of the DML operation can still succeed. This method returns a result object that can be used to verify which records succeeded, which failed, and why.
Visit this link (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database.htm#apex_System_Database_insert) for more info.