Skip to main content

Deleting a supplier

Deleting a supplier record from the WfD database is not recommend, and should be done with extreme care. In most cases, updating the supplier to be Void = 1 is enough to remove it from the system.

UPDATE Suppliers SET Void = 1 WHERE SupplierId = @supplierId

However, in some extreme cases, it may be required to completely delete a supplier record. There are quite a number of foreign key relationships stemming from suppliers, meaning data may need to be deleted from the following tables:

  • InvoiceLine (Links to both dbo.Invoice and dbo.Product)
  • InvoiceVatBreakdown
  • InvoiceCustomField
  • InvoicePage
  • Invoice
  • Product
  • SupplierBusinessUnitLink
  • Supplier