When you try to perform the year-end closing routine in General Ledger in Microsoft Dynamics GP, you receive the following error message:
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PKGL10110'. Cannot insert duplicate key in object 'GL10110'.
To resolve this problem, use the steps below:
- Have all users exit Microsoft Dynamics GP.
- Restore a backup of the company database that was made before you tried to perform the General Ledger year-end closing routine.
- Start SQL Server Management Studio. To do this, click Start, point to All Programs, point to Microsoft SQL Server 20XX (XX=your version), and then click SQL Server Management Studio.
- Run the following scripts against the company database to delete the GL Account Summary tables: DELETE GL10110
- Run Check Links on the Financial Series. To do this
- On the Microsoft Dynamics GP menu, point to Maintenance, and then click Check Links.
- In the Series list, click Financial, and then click All to insert all the Logical Tables to the Selected Tables list.
- Click OK.
- Run reconcile for all the years in the Year list to rebuild the summary tables. To do this,
- On the Microsoft Dynamics GP menu, point to Tools, point to Utilities, point to Financial, and then click Reconcile.
- Click to select the Year check box.
- Click the History option, and then click the oldest year in the Year list.
- Click Reconcile.
- Repeat steps c and d for each year that is listed in the Year list. Start with the oldest year, and end with the current year.
- Perform the year-end closing routine in General Ledger.