Hello everyone. I am trying to update an existing ...
# csvimports
m
Hello everyone. I am trying to update an existing SO via CSV. I want to override the item sublist with a complete new set of items and values. When attempting I am getting an error of
This record contains duplicated key or keys. Please correct it before next update.
I am only mapping internal id, item id, rate, quantity, location. We do not use external ids. Any ideas? Thanks
j
In the import assistant on step 2, did you check the
Overwrite Sublists
checkbox in the Advanced Options?
m
Yes. I also should mention that it’s always worked in the past and the same order in the sandbox has no issues.
j
What is your key? Internal ID?
Have you tried hardcoding it instead of pulling it from the file?
Same order in the sandbox updates fine using the same CSV file?
m
Yeah internal id. I’ve hard coded the id with the same error. Yes same order same csv in the sandbox. Although things have changed on the order since that last refresh.
r
When you say Item ID, do you mean Item Internal ID or just Item ID? if you have two of the same item on the list you're trying to input, that could be the issue. I believe there's like a line-level external ID-type field (though it's not called that) that you can generate and import so the system knows that your two lines are different.
m
Item internal and no duplicates. Do you know what the line lvl external id is called?
d
AFAIK there's no "external id" for transaction lines. There is "Line Unique Key" which is unique across all transaction lines. However you can't use this for mapping. Both
Item
and
Line Id
can be used as the CSV mapping key when performing an update import. However if you're overwriting sublists, the keyed fields shouldn't matter
What does your field mapping page look like? Should look be similar to this, right?
m
That’s exactly what it looks like.
d
oops, I set the header location, not the item location. It should be this:
m
right. yes we are using location at the line level
d
With that mapping, "update" type import and
overwrite sublists
checked, I can't replicate your error, sorry I'd try it again, that error does sound like
overwrite sublists
was off by accident
👍 1
m
I have a feeling there is something corrupt with this order. I’ve never seen this issue. Thanks for you help.
l
@MRJG in your new CSV file, do you have at least one item that is included twice or more in a single SO?
r
Sorry @MRJG I think they're right that there's no line Ext ID. What I was thinking of must have been something custom. You work enough projects, the line between native and custom stuff starts to blur in your noggin. 🤷‍♂️
👍 1