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, ...
Answered

Insert into Data entity - record already exists

(0) ShareShare
ReportReport
Posted on by 4,131

Hi,

I was wondering when we import the data into data entity, the data entity is actually the view in SQL, so if the system pops up an error "The record already exists", it must be the the issue from the actual tables?

Thanks,

I have the same question (0)
  • Suggested answer
    Christoph Thaler Profile Picture
    5,442 on at
    RE: Insert into Data entity - record already exists

    Hi Yuji,

    Or you will have a duplication of records in your input file. Please double check and ensure the records are unique.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    299,069 Super User 2025 Season 2 on at
    RE: Insert into Data entity - record already exists

    Hi Yuji,

    One additional remark here. Assuming the data is inserted correctly in the staging table or if you are using Odata, it shouldn't give you just this error as it will try to find an existing record to update it based on the entity key.

    If you have this error, then probably, another custom index which is set to not allow duplicates is causing the issue. Or there is some additional x++ coding which it trying to insert related records without taking into account that there already might be a reference record present.

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Insert into Data entity - record already exists

    If you get this error during import, it means your entity is not implemented correctly. Normally the entity will not try to insert duplicate record, instead it would find the existing record and update it. So please check if your entity key fields correspond to an unique index in the target table. Most likely they do not and that's not correct. Your entity key fields should always correspond to a unique index in the target table.

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,188

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 593 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans