Salesforce Certified Platform Developer II (Plat-Dev-301) PDII Question # 4 Topic 1 Discussion

Salesforce Certified Platform Developer II (Plat-Dev-301) PDII Question # 4 Topic 1 Discussion

PDII Exam Topic 1 Question 4 Discussion:
Question #: 4
Topic #: 1

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.


B.

Use a try-catch statement and handle DML cleanup in the catch statement,


C.

Use Database.setSavepoint {} and Database.rollBack with a try-catch statement.


D.

Use a try-catch and use sObject.addError() on any failures.


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.