web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Sales Order invoice error: Cannot create a record in General journal entry (GeneralJournalEntry). Date: . The record already exists.

(0) ShareShare
ReportReport
Posted on by

upon invoicing a sales order, this shows up:

Cannot create a record in General journal entry (GeneralJournalEntry). Date: . The record already exists.

sales-invoice-error.JPG

this never happened before, so im confused, because I've never posted an invoice for this particular sales order before.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    The RecId sequence for tables is stored in SystemSequences table and can get out of sync due to one/more of the following reasons:

    1.       Data is inserted in the SQL database directly

    2.       There has been tableId conflicts during model store move

    To fix this error, we need to reset the NextVal field in SystemSequences table. NextVal field should be set to a value greater than the max RecId of the table.

    Steps to resolve the error ‘record already exists’:

    1.       Get the tableId for the table.

    You can find the tableId from AOT, under Properties for the GeneralJournalEntry table.

    2.       Open SQL Server Management Studio and get the max value for RecId for the table, from SystemSequences table.

    1
    SELECT MAX(RecId) FROM <GeneralJournalEntry>

    3.       Update the NextVal field to a value greater than the max RecId of the table.

    1
    2
    3
    4
    5
    UPDATE SystemSequences
     
    SET NextVal = <Max RecId> + 1
     
    WHERE TableId = <GeneralJournalEntry>

    4.       Restart the AOS.

  • Community Member Profile Picture
    on at

    is there anyway that i dont have to access the AOT?

    i am not familiar with programming codes.

    also i dont recall inserting anything directly to SQL

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans