Salesforce Platform Developer I (legacy) — Question 65

A developer identifies the following triggers on the Expense__c object: deteleExpense, applyDefaultsToExpense, validateExpenseUpdate;
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 two.)

Answer options

Correct answer: B, D

Explanation

Option B is correct because creating helper classes allows for cleaner, more maintainable code and separation of logic from the trigger itself. Option D is also correct as unifying triggers into one can reduce the risk of recursion and improve performance. Options A and C do not align with best practices as they either complicate the process or fail to fully separate logic from the triggers.