Hi All,
I was getting the below error while importing the sales orders into the Ax system.
File contains duplicate rows, cannot insert data into staging due to unique key violation
Reason:
We upgraded D365 from 7.0 to 8.0 version and Microsoft added InventoryLotId field in RowIdx index and made it as an unique key in SalesOrderLineV2Staging table.
So, due to that I was not able to import any sales orders with multiple lines.But, I was able to import with a single line.
Solution:
Added "INVENTORYLOTID" field in the XML template as shown below and updated the data mapping in the sales order data entity with INVENTLOTID and changed to "Auto generated"
Afterwards, I was successfully imported the orders without any issues.
@Rahul
I was getting the below error while importing the sales orders into the Ax system.
File contains duplicate rows, cannot insert data into staging due to unique key violation
Reason:
We upgraded D365 from 7.0 to 8.0 version and Microsoft added InventoryLotId field in RowIdx index and made it as an unique key in SalesOrderLineV2Staging table.
So, due to that I was not able to import any sales orders with multiple lines.But, I was able to import with a single line.
Solution:
Added "INVENTORYLOTID" field in the XML template as shown below and updated the data mapping in the sales order data entity with INVENTLOTID and changed to "Auto generated"
Afterwards, I was successfully imported the orders without any issues.
@Rahul
Thank you very much for publishing this. I would not have found out how to solve otherwise.
ReplyDeleteYou're welcome! :)
DeleteThank you for this, just saved me a project deadline.
ReplyDelete