Deactivate and activate
Commands that move a row between active and inactive status, asking for a status reason and locking the row while inactive.
What it is
Many tables have a Status column (Active or Inactive) and a Status Reason column that refines it. The Deactivate command opens a confirmation, Confirm Deactivation, where the user can choose a status reason. The row then becomes inactive, and its form opens read only with a notification at the top. The Activate command, shown on an inactive row, brings it back.
When to use it
Use deactivation instead of deleting when you want to keep the history but stop a row appearing in active views and lookups. Use the Delete command only when the row should disappear for good. Status values are described in System columns.
Licensing and configuration
No extra licence. The commands appear on tables that have a statecode column, and the status reasons come from the table's Status Reason choices. You add or rename reasons in the solution, under the table's columns. Whether the commands show on the command bar is controlled by the command bar settings and by security privileges (Write on the row).
Pitfalls
- An inactive row cannot be edited, so users need Activate first. Plan that into the process.
- Some lookups and views list active rows only. Deactivated rows then disappear from them, which looks like data loss.
- Status reasons are tied to a state. You cannot choose a reason from the other state.
- Related rows are not always deactivated with the parent. This depends on the relationship behaviour.
Try it in the demo
- Open the Accelerator form at the deep link and select Deactivate on the command bar.
- Pick a status reason and confirm. The form turns read only with a banner.
- Select Activate to bring the row back.