Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.
When you try to post a journal entry that contains Analytical Accounting assignments in Microsoft Dynamics GP, you receive the following error message:
Cannot insert the value NULL into column 'aatrxsource' table TRIAL.dbo. AAG30000 column does not allow nulls. Insert fails.
The stored procedure aagCreateRecordsInaaGL returned the following results: DBMS: 515.
This problem occurs because an Analytical Accounting record is missing in the SY01000 table for the Transaction Source code.
To resolve this problem, insert the missing record in each company database. To do this, follow these steps:
First, make a backup copy of the company database:
On the File menu, click Backup.
In the Back Up Company dialog box, click the company that you want to back up in the Company Name list.
In the Select the backup file list, click the location where you want to save the backup file, and then click OK.
Next, run the following script in SQL Server Management Studio against the company database to insert the missing record:
insert into SY01000 VALUES (0,2,0,'Analytical Accounting','AATRX',1,'')
If you are using Microsoft SQL Server, run the script in SQL Server Management Studio against the company database. To open it, click Start, point to Programs, point to Microsoft SQL Server XXXX (where xxxx is the SQL Server version), and then click SQL Server Management Studio. Click on the New Query button in the top menubar, and select the company database from the drop-down list at the top. Copy in the script above and click the Execute button (or press F5) to run the script.