Prevent Deletion of Open Cases
Not Started

Before You Begin:
1. If you haven't already, deploy the pre-requisite Flows: Flow-Into-Apex Package
2. Click on "Run Tests Only" before making any changes. This ensures the Flow works as is without updating the challenge progress.
3. Deactivate the Flow & rebuild as Apex
4. Hit the "Submit" button when you're ready to have your final solution evaluated and challenge progress updated

Flow To Convert:
Prevent Open Case Deletion

Description:
Whenever a user tries to delete an open Case record, an error You cannot delete an open case. should get thrown that prevents them from deleting the record. Closed cases should get deleted as expected.

Object & Trigger Event:
Case, on Before Delete

Concepts to learn:

  • Use of the addError() method

Resources:

YouTube Videos

Salesforce Documentation