Salesforce Certified Platform Developer II — Question 268
A company's support process dictates that any time a Case is closed with a Status of 'Could not fix', an Engineering Review custom object record should be created and populated with information from the Case, the Contact, and any of the Products associated with the Case.
What is the correct way to automate this using an Apex trigger?
Answer options
- A. An after update trigger that creates the Engineering Review record and inserts it
- B. A before update trigger that creates the Engineering Review record and inserts it
- C. An after upsert trigger that creates the Engineering Review record and inserts it
- D. A before upsert trigger that creates the Engineering Review record and inserts it
Correct answer: A
Explanation
The correct approach is to use an after update trigger because you need to ensure the Case has been fully processed and updated before creating the Engineering Review record. Using a before update trigger would not work since the Case's status needs to be finalized first. Options C and D are not suitable as upsert triggers are used for insert and update operations, which is unnecessary in this context.