+ Start a Discussion
tfendttfendt 

Data loader lookup on external id

I have read that this should be possible but I am lost as to how.

I have created an externalID on the users object. The accounts object has a lookup field for the account owner. When I upsert the accounts every day I pass the external user id into the account owner lookup field. But I am getting an error: "Owner ID: id value of incorrect type: MDC"

What else do I have to set up to get this to work? I really don't want to have to export the salesforce user ids and manually match them with the user ids we have on premis.
Best Answer chosen by tfendt
tfendttfendt
I found the answer. I had to add the following mapping to the sdl file. CSV_Column_Name=Owner\:ExternalID__c

https://developer.salesforce.com/forums/ForumsMain?id=906F00000008nQOIAY

All Answers

Ramu_SFDCRamu_SFDC
Unfortunately all lookup/master detail fields need to be given in the form of ID's. As per the error description, I assume that you are trying to update the name of the user rather than their id hence the issue.

The only way to get around this is the to export the data and match the id's for names column.
tfendttfendt
I use other master detail fields and they are mapped using an external ID so I know that is not the case. In this case it is not a master-detail field but a lookup field.
tfendttfendt
I found the answer. I had to add the following mapping to the sdl file. CSV_Column_Name=Owner\:ExternalID__c

https://developer.salesforce.com/forums/ForumsMain?id=906F00000008nQOIAY
This was selected as the best answer
CillaCilla
Agree with best answer chosen above. But would like to add it's actually the CSV_column_name=relationshipname__r:externalid__c. which should be available to drag and drop to the mapping.