Salesforce Certified Platform App Builder — Question 376
The Sales Operations team at AW Computing deletes accounts for a variety of reasons. The sales ops director is worried that the Sales team may delete accounts that sales reps are actively selling into.
How should the app builder keep accounts with open opportunities from being deleted?
Answer options
- A. Remove the Delete permission from the Sales Rep profile.
- B. Remove the delete button on the account layout.
- C. Create an Apex Trigger on the Account object.
- D. Create a validation rule on the Account object.
Correct answer: C
Explanation
Creating an Apex Trigger on the Account object allows for custom logic to prevent deletion based on specific criteria, such as the presence of open opportunities. The other options either don't provide a comprehensive solution (like removing the delete button or permissions) or are not effective in dynamic scenarios where an account may have open opportunities at the moment of deletion.