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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 470

#3
Adis Profile Picture

Adis 270 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans