ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 221 - Certified Platform Developer II discussion

Report
Export

A developer is inserting, updating, and deleting multiple lists of records in a Single transaction and wants to ensure that any error prevents all execution.

How should the developer implement error exception handling in their code to handle this?

A.
Use Database methods to obtain lists of Database.SaveResults.
Answers
A.
Use Database methods to obtain lists of Database.SaveResults.
B.
Use Database.setSavepoint() and Database.rollBack() with a Try/Catch statement.
Answers
B.
Use Database.setSavepoint() and Database.rollBack() with a Try/Catch statement.
C.
Use a Try/Catch and use sObject.addError() on any failures.
Answers
C.
Use a Try/Catch and use sObject.addError() on any failures.
D.
Use a Try/Catch statement and handle DML cleanup in the catch statement.
Answers
D.
Use a Try/Catch statement and handle DML cleanup in the catch statement.
Suggested answer: B
asked 23/09/2024
Minh Phan
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first