Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

aagCreateGLWorkDist DBMS: 512

(0) ShareShare
ReportReport
Posted on by

Hi all, we get thrown an error when entering GL batches, screenshots below. Has anyone encountered these and can think of a fix? I've tried Check Links in Maintenance. Batch posts ok. This started occurring following an upgrade to GP2015 r2 from GP2013 r2. Thanks.

Batch-error-1.jpg

Batch-error-2.jpg

*This post is locked for comments

  • clopez Profile Picture
    clopez 10 on at
    RE: aagCreateGLWorkDist DBMS: 512

    Hi, I found two records and procedures with the delete. However I keep the error, please help

  • Suggested answer
    Héctor Andrade Profile Picture
    Héctor Andrade 650 on at
    RE: aagCreateGLWorkDist DBMS: 512

    Execute these queries, and only the AAG20000 table had 2 records without DOCNUMBR. Then in SQL Server I deleted these records, and this error was solved.

    select * from AAG20000 where DOCNUMBR=''

    select * from AAG20001 where aaSubLedgerHdrID in ()
    select * from AAG20002 where aaSubLedgerHdrID in ()
    select * from AAG20003 where aaSubLedgerHdrID in ()

    Thank you to everybody for your help.

  • igalindo Profile Picture
    igalindo 55 on at
    RE: aagCreateGLWorkDist DBMS: 512

    Thanks Daniel for share the response.


    I was searching blanks Id but never searched Blanks DocNumbr.


    In my case this was the problem. I deleted the rows and the problem was resolved.


    Thanks again

  • Verified answer
    RE: aagCreateGLWorkDist DBMS: 512

    Our issue was logged with Microsoft and here was their response:

    Microsoft Update:

    I understand that your customer has upgraded to GP2015 and they have Analytical Accounting installed.

     

    They are getting the error message below when they enter the account code and amount and then click tab to next line. Issue is happening for all users even sa user.

    ‘[Microsoft][SQL Server Native Client 11.0][SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <=, >, >= or when the subquery is used as an expression.’

    ---------------------

    SCOPE:

    ---------------------

    The scope of this case will be considered resolved when you no long receive the error message below when entering an account in the transaction entry window

    ‘[Microsoft][SQL Server Native Client 11.0][SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <=, >, >= or when the subquery is used as an expression.’

     

    A scope focuses on a single support issue and the reasonable effort needed to resolve it. A single support issue is a problem that cannot be broken down into subordinate issues. If a problem consists of subordinate issues, each shall be considered a separate incident. Questions outside of this scope will need to have separate cases opened.

    ---------------------

    Environment:

    ---------------------

    Build/Detailed Version: GP 2015 R2

    Database: SQL Server

    ---------------------

    ASSESSMENT:

    ---------------------

    I had a case recently where users were experiencing the same error and it was due to blank DOCNUMBR’s in the AAG20000 table. Please run the following query to check for Blank DOCNUMBR:

    SELECT aaSubLedgerHdrID FROM   AAG20000

    WHERE DOCNUMBR = ''

    AND DOCTYPE <> 0

    AND SERIES <> 0

     

    The DOCNUMBR value should never be blank. Under the circumstance that nothing is in the process of posting, there should not be any blank DOCNUMBR values as this would be an invalid/orphaned record. With that in mind, I would like you to run the above statement against the company database to confirm my suspicion. If there are any results, I would recommend the following:

     

    DELETE AAG20000 WHERE DOCNUMBR = ''

     

    -----------

    I hope the above is useful and helps you narrow down. They also said:

    If there are no results from the select above, we will need to capture a SQL trace of the error. This will provide more information than the Log. 

    Since we had results and resolved our issue, we did not progress with the trace.

  • RogerRogerATX Profile Picture
    RogerRogerATX 1,515 on at
    RE: aagCreateGLWorkDist DBMS: 512

    Not on 2015 but this might be in the right direction:  The first error message gives more of a clue.  Is the AA header records in the DYNAMICS db in sync with your company dbs?

    I think it used to be DYNAMICS..AAG00102.

    We used a query like this:

    SELECT MAX(aaSubledgerHdrID) FROM AAG20000
    SELECT MAX(aaFASetupID) FROM AAG04000
    SELECT MAX(aaFASetupID) FROM AAG04001
    SELECT MAX(aaGLWorkHdrID) FROM AAG10000
    SELECT MAX(aaGLWorkHdrID) from AAG10001
    SELECT MAX(aaGLWorkHdrID) from AAG10002
    SELECT MAX(aaGLWorkHdrID) from AAG10003

    And made sure that the largest values here were the same or LOWER than the amount shown in DYNAMICS..AAG00102.  Sounds like there may be a duplicate value in the DYNAMICS table so it's returning a same value, hence the first message.

    Just someplace to start.

  • Suggested answer
    igalindo Profile Picture
    igalindo 55 on at
    RE: aagCreateGLWorkDist DBMS: 512

    Hello danakajoel

    i have the same issue and recently we migrated GP to the versión GP2015R2.

    But i review the AA tables and i dont have blank records.


    Could you help me? maybe give me more ideas please, because it's a big problem in the company.


    thank you

  • Suggested answer
    RE: aagCreateGLWorkDist DBMS: 512

    Hi, we managed to resolve this. There were 2 invalid blank records in the AA Header table which once deleted meant the issue went away.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans