For those working in the Common Data Service, it is common to have a "hero" record which is a curated example shown in demonstrations. Hero Guards may be associated with these key records to protect them from accidental or malicious deletion.
Unintended deletion of a hero record is aggravating and is unfortunately common in demo envirnometns where the demo persona often has an "administrator" security role in order to demonstrate a wide variety of capabilities.
There is not an out of the box way to do this, however it is possible to accomplish with a no-code, configuration-based solution. Hero Guards standardizes this solution and enables quick and easy deployment of this protection for individual records:
The Guard entity can be further conigured to protect other out of the box or configured entities.
This solution is intended for use with the Common Data Service in an environment containing Sales and Service entities from the Common Data Model (dependencies on Lead, Opportunity, and Case entities).
- Install the managed solution file in your Dynamics 365 instance
- Assign the Hero Protector Security Role to any user who will create/remove hero Guards
Update Connections in Flow (optional)
The When a guard is updated, set its name Flow is optional, but will automatically generate a name describing the records that are being protected, and set that as a name. In order to use this the Connections in the Flow must be updated in order to function properly.
- Navigate to https://make.powerapps.com
- In the left navigation, click on Solutions, then select the Hero Guard solution
- Click the ellipse (...) menu next to the When a guard is updated, set its name Flow, then click Edit
- The Flow will open in the maker studio. For each action that requires a connection, there will be a warning icon on the right side of the action. This indicates the need for a connection to be selected.
- Some connections will need to be created if there are not available
- Some actions might be hidden within other built in actions, such as a condition or scope
- Once all actions have a connection, save the Flow
Guard a record
- Open the Hero Guard model-driven PowerApp from the app selector
- Select New Guard
- Assocaite with at least one record and choose Save
- Test by attempting to delete the associated record
Remove a Guard
- Open an existing Guard record
- Choose Delete from the action menu
All feedback and suggestions are welcome!