Salesforce
PDII · Question #410
PDII Question #410: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #410. The question stem and answer options stay visible for context.
Question
An Apex Trigger creates a Contract record every time an Opportunity record is marked as Closed and Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance. When a test batch of records is loaded, the Apex Trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created. What is the most extendable way to update the Apex Trigger to accomplish this?
Options
- AUse a Hierarchy Custom Setting to disable the Trigger for the user who does the data loading.
- BUse a List Custom Setting to disable the Trigger for the user who does the data loading.
- CAdd the Profile Id of the user who does the data loading to the Trigger so the Trigger won't fire for
- DAdd a Validation Rule to the Contract to prevent Contract creation by the user who does the data
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.