Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam PDII All Questions
Exam PDII All Questions

View all questions & answers for the PDII exam

Salesforce Developers PDII Question # 13 Topic 2 Discussion

PDII Exam Topic 2 Question 13 Discussion:
Question #: 13
Topic #: 2

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?


A.

Add the required field to the data setup for all of the unit tests.


B.

Add a before insert trigger on Account to set the value of the required field,


C.

Change the required field to be a validation rule that excludes the System Administrator profile.


D.

Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.


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.