[SalesForce] Using External ID field from User in Dataloader to set lookup field (User)

I have created below two fields –

Object: User, Field API: identifier__c, Type: Text(25) (External ID) (Unique Case Insensitive)

Object: Lead, Field API: Lead_Owner__c, Type: Lookup(User)

Sample Data Load File:

Mapping:

#Mapping values
#Tue Jul 09 10:17:20 EDT 2019
Status=Status
Company=Company
FirstName=FirstName
LastName=LastName
Lead_Owner__c=Owner\:identifier__c
OwnerID=Owner\:identifier__c

Problem: The Lead_Owner__c field is not getting populated.
There is user present where identifier__c value is: BBB1234.

Any idea?

Best Answer

I have replicated all the filed you have mentioned in the above question, and using below mapping file i am able to successfully insert Lead using User external Id as reference to user.

Use upsert in order process the data. During upsert you will be promote to select External ID on user object ie.. in your case is "identifier__c".

Use below mapping file for your problem.

#Mapping values
#Tue Jul 09 10:17:20 EDT 2019
Status=Status
Company=Company
FirstName=FirstName
LastName=LastName
Lead_Owner__c=Lead_Owner__r\:identifier__c
OwnerID=Lead_Owner__r\:identifier__c
Related Topic