Skip to content


Duplicate Key

Matt Stoffel asked 3 years ago
I am tying to update CRM (D365 CE) with a map from GP. It is changes to Orders in GP that need to update Order Headers and Order Lines in CRM (salesorderdetail). Despite the Update box being checked on the map, I still get the, cannot insert duplicate key ffor teh saleorderdetail entity, but it updates the header no problem. If i remove the salesorderdetail guid from the map, i just inserts and duplicates the line, which isn’t good either.
Ethan Sorenson Staff answered 2 years ago
When you import into CRM/CE the destination grouping is used to determine if the line exists or not. Typically I group on the Product lookup field, but if one order can have multiple of the same item, you may need to also group on the line number. You will need to tweak this grouping to find the right combination for your scenario.

If you would like to submit an answer or comment, please sign in to the eOne portal.