Salesforce
CRT-450 · Question #169
A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help…
The correct answer is D. Collect the insert method return value a Saveresult variable. See the full explanation below for the reasoning.
Question
A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?
Options
- AAdd a System.debug() statement before the insert method
- BAdd a try/catch around the insert method
- CSet the second insert method parameter to TRUE
- DCollect the insert method return value a Saveresult variable
How the community answered
(56 responses)- A5% (3)
- B11% (6)
- C4% (2)
- D80% (45)
Community Discussion
No community discussion yet for this question.