Blog Layout

Importing leads or cases against external id on owner field

Mike Arthur • Aug 17, 2016

Why isn't the external id field on User available for 'Owner' when importing Leads or Cases?

I have been exporting records from one org and importing to another. For all objects, I created a custom text field set as an external id, called 'Other_Org_Id' and import the Salesforce record id from the source org into that field in the target org. When I then import say, Opportunities, I can map the Opp AccountId field to the 'Other_Org_Id' Account external Id field and I don't need to use Excel to get the new Account Ids in the target org.

There's more info on using external Ids when importing related records here.

This works great for most relationships, including the 'Owner' field. I created an'Other_Org_Id'external Id field on User object, imported the User records from the source org and I can use the User'Other_Org_Id'to map the 'Owner' field when importing Accounts, Contacts, Opportunities and so on.

When I came to import Leads though, 'Owner' wasn't in the list of fields that could be mapped to external Ids.The same thing happens if you try to import Cases.After some head scratching and trying other things, I figured it out.

It's because Leads and Cases can be owned by Queues as well as Users, and there is currently no way to add a custom external Id field to Queues, so an external Id field is not offered against Owner when importing Leads and Cases.

So it's back to vlookup in Excel to get the new User Ids for Leads and Cases.

My Blog of Salesforce Stuff

by Mike Arthur 16 Oct, 2021
'XHR Failed' error when trying to install VS Code extension
by Mike Arthur 09 Jun, 2020
What is $A (dollar A) in Lightning Aura component framework? Is it a global variable? Where are the docs for $A?
by Mike Arthur 08 May, 2020
Authorise a Salesforce Connected App using OAuth 2.0 JWT Bearer Flow
by Mike Arthur 26 Apr, 2020
REST API Connection to Salesforce Connected App Using OAuth 2.0 Authentication from Postman
by Mike Arthur 23 Mar, 2020
How to create a Lightning tab menu with dropdown sub-menu
by Mike Arthur 27 Nov, 2018
How to show a month by month trend chart with multiple years on same chart
by Mike Arthur 06 Nov, 2018
What to do if you receive emails about expiring certificates
22 Aug, 2018
Process json strings when working with integrations
by Mike Arthur 22 Aug, 2018
If you're switching email accounts you can copy appointments from one calendar to the other
by Mike Arthur 22 Aug, 2018
When you search in Outlook 2016, how do you see in which folder you filed an email in the results?
More posts
Share by: