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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Cannot create a record in Expense lines. The record already exists.

(2) ShareShare
ReportReport
Posted on by

Hello experts,

I have a problem with creating new records in Expenses module. I know it's related to number sequences because I had a similar problem with entering timesheets, but that was solved by deleting the Free numbers in Status list.

.Screenshot-2020_2D00_06_2D00_11-at-16.04.42.png

The status list for this number sequence is empty. I tried manual refresh Current/All with no success.

I tried reseting my user's usage data and I got a different error:

Screenshot-2020_2D00_06_2D00_11-at-16.08.43.png

Also got this one:

Screenshot-2020_2D00_06_2D00_11-at-16.09.34.png

Any advice?

Thank you!

I have the same question (0)
  • FC-24090602-0 Profile Picture
    17 on at
    Cannot create a record in Expense lines. The record already exists.
    Hi Community, 
     
    I have a different error message, and hoping you can help to solve this. 
     
     
    Any chance this could also be reset with the sequence number? 
     
    Thanks, 
    Fiona. 
  • Suggested answer
    d365 Dynamics  community Profile Picture
    8 on at
    RE: Cannot create a record in Expense lines. The record already exists.

    Go to landed cost parameters / number sequences  / autocast numbers

    and change the "next" number in the general folio of the sequence number or change all the sequence number

    Regards,

    Karim BELHEDI

    SPX

  • Community Member Profile Picture
    on at
    RE: Cannot create a record in Expense lines. The record already exists.

    Hello Corina,

    Thanks for your reply! Our partner deals with the Dev side - I suggested the insert method but not sure if they tried it. I know they tried a DB resync and opened a ticket to MS already.

    Some users still experience this error, but for majority of them is fixed - not sure what changed.

    Thank you again!

  • Suggested answer
    Corina Manescu Profile Picture
    on at
    RE: Cannot create a record in Expense lines. The record already exists.

    Hello,

    Hope you are doing well. Just wondering whether you have made some progress here and have been able to resolve the issue. 

    Have you had the chance to debug the insert method of TrvExpTrans as per Nikolaos suggestion?

    Also, I have done a research on this topic and I found a similar issue caused by duplicate Expense Transaction Number (not to be confused with expense report number). ExpenseTransaction number (TrvExpTrans.ExpTransNumber) is unique for every expense transaction line, somehow the number sequence got corrupted on that specific case and caused the error message – “Cannot create a record in Expense lines (trvExpTrans). The record already exists”.

    You can verify on a test environment by changing the Number Sequence for the Expense Transaction Number. Below is a screenshot from standard environment. The recommendation is to change the format to LEGALENTY_SOMECONSTANT_########### so that it doesn't overlap with current number sequence. Also, it would be good if you stop the auto-cleanup.

     pastedimage1592835943379v1.png

    If this is not the same case, I would encourage you to log a new service request to Microsoft support so we can review the reported issue and further investigate it.

    Thank you,

  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Cannot create a record in Expense lines. The record already exists.

    I suggest to debug the insert method of TrvExpTrans to see all details of the record that is being inserted.

  • Community Member Profile Picture
    on at
    RE: Cannot create a record in Expense lines. The record already exists.

    1) 2441 the latest expense report number in All expenses

    2) 2461 the "next value"

  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Cannot create a record in Expense lines. The record already exists.

    1) What is the latest expense report number in your system?

    2) What is the "next value" of your expense report number sequence?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,258

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 949 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 631 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans