# Reactivation reasons

| If you need to… | Go to |
|---|---|
| Check access before maintaining a reason | [Before you start](#before-you-start) |
| Reach the configuration list | [Find the reactivation-reasons list](#find-the-reactivation-reasons-list) |
| Read the list and entry form | [Understand the list and entry form](#understand-the-list-and-entry-form) |
| Add or change a reason | [Add or edit a reactivation reason](#add-or-edit-a-reactivation-reason) |
| Remove a reason | [Delete a reactivation reason](#delete-a-reactivation-reason) |
| Open the company configuration area | Configuration home |

## Reactivation reasons

Reactivation reasons maintains the names available for a reactivation reason. When staff
need to record why a relationship resumes, add the reason before they reactivate the related
work. The list is available at `company/reactivationreasons`.

## Before you start

**Prerequisites**

- Use a signed-in account that can access the company configuration area.
- Confirm that your permissions allow the action you need.

The page uses an authentication guard. Your permissions control the maintenance controls:

| Permission condition | What appears |
|---|---|
| Create permission | **New** appears. |
| Edit permission | The row edit control appears, and selecting a row permits row-click editing. |
| Delete permission | The row delete control appears. |

Your access determines whether the list and its maintenance controls are available.

> **Note:** Access to the route determines whether the list and its maintenance controls can
> be used.

## Find the reactivation-reasons list

The list is under Configuration > Reactivation Reasons.

**Prerequisites**

- Complete the access checks in [Before you start](#before-you-start).

**Steps**

1. Open Configuration.
2. Open **Reactivation Reasons**.
3. Confirm that you are on the reactivation-reasons list before selecting an edit or delete
   control beside a reason.

**Result:** You are on the reactivation-reasons list.

## Understand the list and entry form

The list shows reactivation-reason names. **Name** is the only visible heading, and each
listed reason has controls for editing and deleting it.

| Surface | What it does |
|---|---|
| **Name** | Displays the reason name and is required in the entry form. |
| Each listed reason | Has an edit control and a delete control. |
| Entry form | Appears inside the save popup when a reason is selected. |
| Save popup title | Shows `New Reactivation Reason` for a new entry or `Edit Reactivation Reason` for an existing entry. |
| Save popup controls | The submit and close controls appear when the popup is in save mode. |

The list does not show a Search panel or page controls. It also does not show column headings
or allow changes directly in the list. Use each reason's edit or delete control, then work in
the popup.

## Add or edit a reactivation reason

Use this procedure to create a selectable reason or change an existing one.

**Prerequisites**

- **New** must be available for creation, or an edit control beside a reason must be available.
- Have the reason name ready.

**Steps**

1. Choose the maintenance action:

   | If you need to… | Select or use |
   |---|---|
   | Create a reason | **New**. This opens the `New Reactivation Reason` popup with an empty reason and ID `0`. |
   | Edit a reason | Select the edit control beside the reason. The selected row opens in the `Edit Reactivation Reason` popup. |

2. In the popup, enter the reason name in **Name**.
3. If **Name** is empty, enter a value in **Name**. The form displays `Name is required`.
4. If **Name** contains only spaces, replace it with a proper value in **Name**.
5. At the bottom of the save popup, select **OK** to submit the form.
6. If you do not want to save the entry, select the control in the upper-right corner of the save popup.
7. Confirm the success message `Data saved Successfully`.

After a successful save, the popup closes and the list refreshes.

**Result:** The new or edited reason is submitted, the popup closes after a successful save,
and the refreshed list contains the saved reason.

## Delete a reactivation reason

Use this procedure to remove a reason that staff must no longer select.

**Prerequisites**

- A delete control beside a reason must be available.
- Identify the row to remove by its **Name** value.

**Steps**

1. Select the delete control beside the reason you want to remove.
2. Read the confirmation message `Are you sure you want to delete this item?`, then choose one
   option:

   | If you want to… | Select |
   |---|---|
   | Remove the selected reason | **Delete** |
   | Keep the reason | **Cancel** |

3. If you selected **Delete**, confirm the success message `Data Deleted Successfully`.

After a successful delete, the row is removed from the displayed list and the list refreshes.

**Result:** The selected reason is deleted and the refreshed list no longer contains its row,
or the delete menu is closed without deleting it.

## Handle access and row-selection variations

The available controls depend on permission and selection state.

| Condition | Reader-facing result |
|---|---|
| Create permission | **New** is available for creating a reason. |
| Edit permission | An edit control beside a reason is available, and row-click editing is permitted. |
| Delete permission | A delete control beside a reason is available. |
| A reason is selected | The form appears inside the save popup. |
| No selected reason | The selected-reason form does not appear. |

## When saving or deleting goes wrong

If a save or delete does not complete as expected, use the message shown on screen.

**Prerequisites**

- Have the message shown on screen available.
- Have access to the Configuration area, or an administrator who can check it.

**Steps**

1. Use the message shown on screen to choose an action:

   | Message | Action |
   |---|---|
   | `Name is required` | Enter a value in **Name**, then select **OK**. |
   | `please enter a proper  name` | Replace the spaces in **Name** with a proper value, then select **OK**. |

2. If neither message appears, ask an administrator to check access and the
   configuration list before repeating the action.

**Result:** The corrected action is submitted again, or an administrator has the information
needed to investigate the incomplete action.

## After maintaining a reason

After a successful save, the product returns `Data saved Successfully` and refreshes the list.
After a successful deletion, it returns `Data Deleted Successfully` and refreshes the list.

**Result:** The maintained reason appears in the refreshed list after saving, or its row is
removed after deletion.
