function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Helen KastenHelen Kasten 

Hi, I have an urgent issue with a changing owner ID after uploading new leads.

First of all, thank you for helping me.

I have an issue with uploading new leads to Salesforce. I used the Data Import Wizard.
The upload csv includes also thousands of leads with different owners and their IDs.
After I uploaded/updated existing leads, the owner ID changed from other owners to me (as creator).
There should be no change of lead owner id after the download.

Does anyone have a solution to this problem? THANK YOU!

Jawaad ShahJawaad Shah
Hi Thomas

I'm assuming you may just want to run an update and fix the OwnerId.

I would export the Leads you loaded using developer workbench and run an update:

1 - Export the Data

Log into

Queries > SOQL Query
Object = Lead

Select the fields that will help you identify a unique lead such as email:

Your query may look like this:

SELECT CreatedById,CreatedDate,Email,FirstName,Id,LastName,OwnerId FROM Lead WHERE OwnerId = 'YOUR USER ID' ORDER BY CreatedDate DESC NULLS FIRST

When you are happy you only see the records you imported, run the query by selecting the Bulk CSV option.

You now have your data in a csv which you can use for the update.

2 - Update the CSV

Using your original CSV, do a vlookup (eg on Lead email), and populate the OwnerId in the new CSV with the correct OwnerId from your original CSV.

3 - Update the data

Strip down your new CSV so you only have 2 columns:

Id (Salesforce Id)
OwnerId  (Id of the correct Owner)

Testing on a handful of records, select Data > Update

Object Type = Lead
From file = browse to your file

Click next and map the 2 fields and run.

This should work for you, and good luck!

Thanks, Jawaad