Skip to main content

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​

FieldDescriptionRequiredValues and rules
Distribution UnitThe unit you want to delete.YesA 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.
ButtonWhat it does
DeleteDeletes the selected unit. Disabled until you select a unit.
CancelCloses 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 deletedDetails
Representative ordersThe unit's orders and their lines.
Distribution routesThe unit's routes with their customers.
DiscountsThe link between the unit and the distribution discounts. The discount cards themselves stay.
TargetsThe unit's targets, the targets of its customers, and the materials targets by distribution units with their lines.
Distributors budgetThe special-offer budgets set for the unit.
VisitsThe 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 listsThe lists you ticked for this unit on its card, such as material templates.
Follow-up dataCoverage updates and customer data updates, the recorded locations of the unit, targeted visits, outlets inventory, commission incentives and commission point periods.
Payments and expensesThe 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​

  1. You click Delete. If you have not selected a unit, nothing happens.
  2. 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.
  3. On Delete the program runs the deletion in the database. Either all the data is deleted or nothing is.
  4. 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​

MessageWhen it appearsWhat to do
The distribution unit successfully deletedThe deletion finished.Nothing.
Distribution unit not foundThe 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 unitThe 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.

This page applies to alameen ERP 10, version 10.1.79.764.