Salesforce Platform App Builder - Practice Test #6
65 complete questions for Salesforce Platform App Builder exam preparation.
Universal Containers wants to prevent users from deleting an 'Account' record if it has open Cases associated with it. The solution must be declarative and display a custom error message on the user's screen. Which method meets these requirements?
Category: Business Logic and Automation
Explanation
Detailed breakdown of the correct answer
Delete Validation with Flow
Salesforce allows intercepting delete events before they occur using record-triggered flows in the 'Before Delete' phase. By combining this with a 'Custom Error' element, error messages can be displayed directly in the UI, replacing the need for Apex code.
Therefore, the correct answer is: Configure a Record-Triggered Flow in 'Before Delete' mode using a 'Custom Error' element. It is the only declarative way to prevent deletion and show a UI message.
The option that says: Create a Validation Rule is incorrect because validation rules are only evaluated during insert and update operations, not delete operations.
The option that says: Create an Apex Trigger is incorrect because the requirement explicitly demands a declarative (no-code) solution.
The option that says: Use Process Builder is incorrect because Process Builder does not support delete events and sending an email does not block the action.