nerdexam
Salesforce

CRT-450 · Question #238

Considering the following code snippet: When the code executes a DML exception is thrown. How should the developer modify the code to ensure exceptions are handled gracefully?

The correct answer is A. Implement a try/catch block for the DML. See the full explanation below for the reasoning.

Question

Considering the following code snippet:

When the code executes a DML exception is thrown. How should the developer modify the code to ensure exceptions are handled gracefully?

Exhibit

CRT-450 question #238 exhibit

Options

  • AImplement a try/catch block for the DML.
  • BRemove null items from the list if Accounts.
  • CImplement the upsert DML statement.
  • DImplement Change Data Capture

How the community answered

(52 responses)
  • A
    77% (40)
  • B
    8% (4)
  • C
    12% (6)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice