Skip to main content

Error when deleting pay element: A constraint violation has prevented the data from being deleted

Unable to delete pay element type: A constraint violation has prevented the data from being deleted.

H
Written by Harry Ledger
Updated over a month ago

If you experience this error, the pay element is currently in use for one or more employees' pay records and must first be removed from those records.

Identify the related pay elements

  1. Perform a data export by adjusting the PAY_ELEMENT_NAME as needed.

Select Person.Snapshot.[First Name], Person.Snapshot.Surname, Person.Snapshot.[Person Number], Employee.[Pay History].[Pay Element Type] From Person.Snapshot Inner Join Employee.[Appointment History] On Person.Snapshot.[Person Number] = Employee.[Appointment History].[Person Number] Inner Join Employee.[Pay History] On Employee.[Appointment History].[Appointment Number] = Employee.[Pay History].[Appointment Number] Where Employee.[Pay History].[Pay Element Type] = 'PAY_ELEMENT_NAME'

Edit existing pay records

  1. Under Employees, click Employees.

  2. Click Career History, then click the Basic Pay or Other Pay History tab.

  3. Locate and delete the pay history record containing the incorrect pay element.

Once this is done, you should be able to delete the pay element successfully.

Did this answer your question?