Identifying Unposted Transactions For An Employee In Dynamics GP

A few weeks back the Human Resources department came to me about an issue they were having in Dynamics GP which was preventing them from inactivating a terminated employee.  When attempting to inactivate the employee they were getting the following error message:

"There are unposted transactions for this employee.  The employee record can not be deleted or inactivated."

My first thought was that there was still a pending payroll batch sitting in GP that had not yet been processed, however this was not the case as this employee had left the company 2 weeks prior and all payroll runs had been completed.

My next step was the check the back-end payroll tables that store this data.  On occasion these tables do not get properly purged once a payroll batch has been processed.  There are 3 tables that you will want to check when attempting to resolve this error.

UPR10302 – Payroll Transactions

UPR10307 – Payroll Manual Checks

UPR10308 – Payroll Manual Check Detail

I wrote the following script to simply the process of checking these tables.  The script allows you to specify a particular employee ID and returns any records within each of the 3 tables that contain the employee.

Once you have executed the script and reviewed the results, the simple answer as to what to do to resolve the issue is to delete any records that are returned.  However, it’s best to check with your Accounting department prior to deleting the records to verify that the unposted transactions can safely be removed.