/
Error when deleting location codes

Error when deleting location codes



Description of Issue

When deleting Payroll Location Codes the system is returning an error Error executing prlocatnio_delete The DELETE statement conflicted with the REFERENCE constraint "FK_PersonnelPosition_PayrollWorkLocation". The conflict occurred in database "xxxx"



Context
  • HRM

  • Payroll 

  • Location Codes



Cause

If location codes are tied to employee, position or job class or history records they cannot be deleted. This error occurs when a Location code exists in Position Control under the Position Change area. 



Resolution

To remove the location codes from Position Control Position Change records

  1. Navigate to Human Resources > Position Control and Budgeting > Position Control

  2. Click on the Position Change menu option

  3. Click Search and enter the locations that are being deleted then click Accept

  4. Update the records to have a different Location code and hit Accept

  5. Navigate to Payroll> Payroll Setup > Location Codes and try to delete the impacted locations again



Additional Information

It is best practice once Location Codes are in the system to not delete them unless it is absolutely necessary 











Related content

The DELETE statement conflicted with the REFERENCE constraint "FK_PersonnelPosition_PositionType"
The DELETE statement conflicted with the REFERENCE constraint "FK_PersonnelPosition_PositionType"
More like this
Error attempting to delete Payroll Miscellaneous Code for Personnel Status Code
Error attempting to delete Payroll Miscellaneous Code for Personnel Status Code
More like this
Getting error when delete a payroll Allocation Code
Getting error when delete a payroll Allocation Code
More like this
Location code in Payroll Detail History
Location code in Payroll Detail History
More like this
Error while deleting deduction code in Deduction and Benefit Master
Error while deleting deduction code in Deduction and Benefit Master
More like this
A valid location code is required error when creating a Time Entry batch
A valid location code is required error when creating a Time Entry batch
More like this