The record already exists error in data entities in dynamics 365 finance & operations
Views (1669)
I was keep getting the below error while exporting sales invoice lines. I created a composite data entity for exporting sales invoices with lines into XML format.
Cannot create a record in Test Sales invoice line (SalesInvoiceLineStagingV2). Item: XXXXXX.
The record already exists.
Reason:
After doing some research I realized that the cluster & staging index is missing for sales invoice header and lines.
Solution:
I added both cluster & staging index for sales invoice header and lines staging tables and added them in the properties.
Recompile the models & refresh entities.
That's it.
Cannot create a record in Test Sales invoice line (SalesInvoiceLineStagingV2). Item: XXXXXX.
The record already exists.
Reason:
After doing some research I realized that the cluster & staging index is missing for sales invoice header and lines.
Solution:
I added both cluster & staging index for sales invoice header and lines staging tables and added them in the properties.
Recompile the models & refresh entities.
That's it.
This was originally posted here.
*This post is locked for comments