Delete Distribution Unit
This window deletes a distribution unit together with its visits, routes, targets, orders and the rest of what is linked to it, in one step. Deleting a unit from its own card is refused when the unit has links.
Opening the window
From the ribbon: Distribution > Tools > Distribution Tools > Delete Distribution Unit.
The command needs the Delete Distribution Unit permission in Users Management > Operations, and the distribution feature in your licence.
Fields and buttons
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Distribution Unit | The unit you want to delete. | Yes | A lookup box. Its menu and list are in Small menus and lookup boxes in Distribution. If the file is a publisher or a subscriber in replication, it shows only the units whose source is this file. |
| Button | What it does |
|---|---|
| Delete | Deletes the selected unit. Disabled until you select a unit. |
| Cancel | Closes the window without deleting. |
Below the box the window shows the text "The following distribution unit links will be deleted if any:" and a fixed list: "Visits", "Distribution Routes", "Targets", "Distributors Budget" and "Representative Orders", then the line "or any other link". The list is explanatory text only. The real list is in What the program deletes.
What the program deletes
The program deletes the unit and everything below, in a single operation:
| What is deleted | Details |
|---|---|
| Representative orders | The unit's orders and their lines. |
| Distribution routes | The unit's routes with their customers. |
| Discounts | The link between the unit and the distribution discounts. The discount cards themselves stay. |
| Targets | The unit's targets, the targets of its customers, and the materials targets by distribution units with their lines. |
| Distributors budget | The special-offer budgets set for the unit. |
| Visits | The unit's trips and visits, the details of each visit, questionnaire answers, the materials and groups recorded in the visits, and the distribution center visits. |
| Device lists | The lists you ticked for this unit on its card, such as material templates. |
| Follow-up data | Coverage updates and customer data updates, the recorded locations of the unit, targeted visits, outlets inventory, commission incentives and commission point periods. |
| Payments and expenses | The payments recorded for the unit, and the unit's expenses. |
The program does not delete invoices or entries in this operation. It does not delete customer cards, the representative card, the vehicle card or the group the unit belonged to.
How the deletion runs
- You click Delete. If you have not selected a unit, nothing happens.
- A confirmation appears titled "Are you sure you want to delete?" with the text: "Current record will be permanently deleted, and it can't be retrieved. To have the record deleted, click "Delete". If you are not sure, click"Cancel"." It always appears, and no option in Program Options turns it off.
- On Delete the program runs the deletion in the database. Either all the data is deleted or nothing is.
- After a successful deletion the program records a delete operation in the event log with the unit's code and name, clears the box, and shows "The distribution unit successfully deleted". The window stays open so you can delete another unit.
Messages
| Message | When it appears | What to do |
|---|---|---|
| The distribution unit successfully deleted | The deletion finished. | Nothing. |
| Distribution unit not found | The selected unit was deleted from elsewhere before you clicked Delete. | Select the unit again, or close the window. |
| An error occurred while deleting the distribution unit | The database refused the deletion, so all of it was cancelled and nothing was deleted. | Check the connection and try again. If it repeats, contact support. |
When you delete a unit from its own card and the unit has links, the message "Please use Distribution Unit Delete tool to be able to delete a distribution unit which has links" appears. It appears when the unit has distribution routes, discount links, targets, a budget or trips.
Related
This page applies to alameen ERP 10, version 10.1.79.764.