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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Getting error Cannot create a record Data Entity. The record already exists. '2' 'Name of Data entity' record(s) inserted in staging

(0) ShareShare
ReportReport
Posted on by 162

Hi,

I have duplicated the GeneralJournalAccountEntryEntity as I need only few new and selective fields. But while exporting i get the following error

  

I have even checked if the staging has staging index, and it has. Please help me in resolving this.

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Harshal, Have you duplicated staging table as well and changed data entity index? If you haven't duplicate staging table then try and update in data entity.

    Also, you can use below SQL script to check if there is duplicate records in data entity or staging table. In Group by fields, add index fields. If it returns greater than 1 for any record then there are duplicate records. You can modify the script to find duplicate records then.

    SELECT TOP 1 COUNT(RECID) AS KEYCOUNT 
    FROM SALESPOSTEDSALESPRICEJOURNALLINEENTITY
    GROUP BY TRADEAGREEMENTJOURNALNUMBER,LINENUMBER,DATAAREAID

  • Harshal Jain Profile Picture
    162 on at

    Hi Mohit,

    I ran the SQL scripts for both the enity and staging, it return 1. Also I deleted the staging, duplicated the same and added it in Entity, but got the same error. Any other suggestions please ?

  • Harshal Jain Profile Picture
    162 on at

    I wasn't including the primary key while exporting. After I added it, I was able to export the data successfullly.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans