Salesforce
PDII · Question #15
PDII Question #15: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #15. The question stem and answer options stay visible for context.
Question
A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail. What is the optimal way for a developer to fix the issue?
Options
- AAdd a before insert trigger on Account to set the value of the required field.
- BCreate a TestDataFactory class that serves as the single place to create Accounts for unit tests
- CChange the required field to be a validation rule that excludes the System Administrator profile.
- DAdd the required field to the data setup for all of the unit tests.
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.