AX / D365FO – Error : “Cannot create a record in Entity (DMFEntity). The record already exists.”

After creating a data entity you may get the error

Validation started 10/28/2023 10:21:26.
Validation step: Database synchronization started. Time: 10/28/2023 10:21:26
Log level – Error | Infolog diagnostic message: Log level – Error | Infolog diagnostic message: ‘Cannot create a record in Entity (DMFEntity). Entity: Sales orders, OTS_SalesTableStaging.
The record already exists.’ on category ‘Error’.

these advise you to do a full build of your package but that won’t solve the problem.

The problem is due to the label duplication.

The only way to solve the problem is to give your entity a custom name

One response to “AX / D365FO – Error : “Cannot create a record in Entity (DMFEntity). The record already exists.””

  1. Gangadhar Avatar
    Gangadhar

    Hi, I am facing a similar issue. When I changed the label text to some different text, it got solved. But it started appearing again. When doing a full build and full synchronize, there is no error but when doing the rebuild of project and syncing the project to database there is error.

    Also when running the export for the entity it works without any issue and no error of “Cannot create a record “error when running the entity multiple times with same set of data.

    Do you know what could be the reason ? I did the Refresh entity list as well and made sure the label on entities are unique.

    Like

Leave a reply to Gangadhar Cancel reply