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Â