Salesforce
CRT-450 · Question #233
A developer identifies the following triggers on the Expense __c object: The triggers process before delete, before insert, and before update events respectively. Which two techniques should the…
The correct answer is A. Create helper classes to execute the appropriate logic when a record is saved. D. Maintain all three triggers on the Expense__c object, but move the Apex logic out of the trigger. See the full explanation below for the reasoning.
Question
A developer identifies the following triggers on the Expense __c object:
The triggers process before delete, before insert, and before update events respectively. Which two techniques should the developer implement to ensure trigger best practices are followed? Choose 2 answers
Options
- ACreate helper classes to execute the appropriate logic when a record is saved.
- BUnify the before insert and before update triggers and use Flow for the delete action.
- CUnify all three triggers in a single trigger on the Expense__c object that includes all events.
- DMaintain all three triggers on the Expense__c object, but move the Apex logic out of the trigger
How the community answered
(43 responses)- A77% (33)
- B7% (3)
- C16% (7)
Community Discussion
No community discussion yet for this question.