Use the resolution that is appropriate for your situation, and then test to see whether your issue is resolved. If you have to open Microsoft SQL Server Management Studio, use one of the following methods, as appropriate:
- If you are using SQL Server 2005, click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.
- If you are using SQL Server 2008, click Start, point to All Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.
- If you are using SQL Server 2008 R2, click Start, point to All Programs, point to Microsoft SQL Server 2008 R2, and then click SQL Server Management Studio.
- If you are using SQL Server 2012, click Start, point to All Programs, point to Microsoft SQL Server 2012, and then click SQL Server Management Studio.
Resolution 1
Verify that the GL00100 and GL00105 tables have the same number of records. To do this, follow these steps:
- Open SQL Server Management Studio.
- Run the following scripts against the company database to verify how many records exist in the GL00100 Account Master table and the GL00105 Account Index Master table.
Select count (*) from GL00100
Select count (*) from GL00105
- Use one of the following scenarios, based on your findings from the count scripts.
Scenario 1The Account Master table (GL00100) has more records than the Index Master table (GL00105). To resolve this issue, run check links to create the corresponding index record. To do this, follow these steps:
- In Microsoft Dynamics GP 10.0, Microsoft Dynamics GP 2010, and Microsoft Dynamics GP 2013, point to Maintenance on the Microsoft Dynamics GP menu, and then click Check Links. In Microsoft Dynamics GP 9.0 and earlier versions, click File, point to Maintenance, and then click Check Links.
- In the Series list, click Financial.
- In the Logical Tables list, click Account Master, and then click Insert.
- Click OK to run the Check Links process. You can print the error log to the screen to check whether the account index was updated.
- Close the report.
- Run the count scripts from step 2 again to verify that the tables have the same number of records, and then test again.
Scenario 2The Index Master table (GL00105) has more records than the Account Master table (GL00100) table. To resolve the issue, delete the additional index records in the GL00105 table that do not correspond to a valid General Ledger account. To do this, follow these steps:
- Open SQL Server Management Studio.
- Copy the script, and then execute it against the company database to view the additional index records in the GL00105 table that do not exist in the GL00100 table. If you find any additional records, delete them by using the following script:
Select * from GL00105 where ACTINDX not in (select ACTINDX from GL00100)
Delete GL00105 where ACTINDX not in (select ACTINDX from GL00100)
- Run the count scripts from step 2 again to verify that the tables have the same number of records, and then test again.
Scenario 3 If the GL00100 and GL00105 tables have the same number of records, investigate the other causes that are described here.
Resolution 2
For any other modules that have an Account Master table, such as Analytical Accounting, make sure that the Account Master table in the sub-module has the same number of records as the GL00100 Account Master table. The following example shows how to troubleshoot Analytical Accounting.
Note Review the triggers on the GL00100 table to see the other modules that may be updated. For information about how to view the triggers, see Resolution 3.
To troubleshoot the Account Master table in Analytical Accounting (AAG00200), follow these steps:
- Run the following scripts in SQL Server Management Studio against the company database to verify how many records are in each table.
Select count (*) from GL00100
Select count (*) from GL00105
Select count (*) from AAG00200
- If the GL00105 Account Index Master table has more or fewer records than the GL00100 Account Master table, see Resolution 1.
- For the AAG00200 Account Master table, use one of the following scenarios, as appropriate.
Scenario 1
If the AAG00200 table has more records than the GL00100 table, run the following script to delete any account indexes that do not exist in the GL00100 Account Master table:
Delete AAG00200 where ACTINDX not in (Select ACTINDX from GL00100)
Scenario 2
If the AAG00200 table has fewer records than the GL00100 table, you must delete the AAG00200 table and then re-create it.
Note When you take this action, the link between the General Ledger account and Account Class is removed in Analytical Accounting. Therefore, before you begin, you may want note the accounts that are linked to each class ID in Analytical Accounting. - In SQL Server Management Studio, run the following script against the company database to delete the AAG00200 table:
- Run the following script to re-create the AAG00200 table:
Insert into AAG00200 (ACTINDX,aaAcctClassID,aaChangeDate,aaChangeTime) select ACTINDX,0,convert(char(10),getdate(),111),convert(char(12),getdate(),114) from GL00100 where ACTINDX not in (select ACTINDX from AAG00200)
- Click Cards, point to Financial, point to Analytical Accounting, and then click Accounting Class Link.
- Enter the class ID, mark the appropriate accounts to link, and then exit the window.
- Run the count scripts again in step 1 to verify that all three tables have the same number of records, and then test again.
Resolution 3
To resolve the problem of having additional triggers, run the following script in SQL Server Management Studio against the company database to view all the triggers on the GL00100 table:
Review the triggers that are listed in this table to see whether the following FRx triggers are listed. (Do this in Microsoft Dynamics GP 9.0 and earlier versions. These triggers are included in the General Ledger Account Master triggers in later versions.)
- FRx_Chart_Delete
- FRx_Chart_Insert
- FRx_Chart_Update
If this is the case, you can remove these triggers by following these steps:
- Back up the company database.
- Run the following scripts in the Support Administrator Console or in SQL Server Management Studio against the company database:
Drop trigger FRx_Chart_Delete
Drop trigger FRx_Chart_Insert
Drop trigger FRx_Chart_Update
- Test again.
Resolution 4
To resolve this problem, run a script to view the accounts that exist in the frl_acct_code table but not in the General Ledger Account Master table. To do this, follow these steps:
- Back up the company database.
- Run the following script in the Support Administrator Console or in SQL Server Management Studio:
Select * from frl_acct_code where acct_id not in (select ACTINDX from GL00100)
- In the results that are returned, determine whether the account number that you want to add or save is already listed.
- Run the following script to remove additional accounts from the frl_acct_code table:
Delete frl_acct_code where acct_id not in (select ACTINDX from GL00100)
- Verify that all three tables now have the same number of records:
Select count (*) from GL00100
Select count (*) from GL00105
select COUNT (*) from frl_acct_code
- Log on to Microsoft Dynamics GP, and try to add the account again.
Resolution 5
To check the identity column, follow these steps:
- Click Start, point to Programs, point to Microsoft SQL Server, and then click SQL Server Management Studio.
- Expand the company database.
- Expand Tables.
- Right-click GL00100, and then click Design if you are using SQL Server 2008. (If you are using SQL Server 2005, click Modify.)
- Under Column Name, click DEX_ROW_ID.
- In the Column Properties window at the bottom, scroll down, and then expand Identity Specification.
- Make sure that Yes is selected in the Identity Specification field. Also, make sure that 1 is selected in the Identity Seed field and in the Identity Increment field.