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:

  1. First, make a backup copy of the company database:

    1. On the File menu, click Backup.

    2. In the Back Up Company dialog box, click the company that you want to back up in the Company Name list.

    3. In the Select the backup file list, click the location where you want to save the backup file, and then click OK.

  2. 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.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!