Print this page

How do I mass update record types using the Data Loader?

Knowledge Article Number 000005123

How do I mass update record types using the Data Loader?


If you've never used the Data Loader before, please review the User Guide:

Note: Always run a small test by choosing 2 to 3 records as the changes are not reversible and another dataloader operation must be done.

To update record types in mass using the Data Loader, follow the instructions below:

First, identify the specific IDs of the records that you wish to update. There are two ways to do this:
  • Run an export with the Data Loader to extract the IDs for the records you wish to update. You can add conditions to your query to select records that meet your criteria. Make sure to select "ID" and "RecordTypeID" in your field selection.
  • Choose a Target for extraction (The place where .csv file should be saved) 
    And at the end click "Finish"
    Run a report in Salesforce that retrieves the records you wish to update. Be sure to include the record ID in your report. Export the report as a .csv file.

Now that you have a .csv extract that contains the IDs of the records you want to update, the next step is to prep the extract file.

  • In salesforce, navigate to the record type that you wish to apply to your records. For example, if you wanted to change the record type of your selected leads to a record type called "weblead", go to:
  • Setup | App Setup | Customize | Leads | Record Types | Weblead.

Once you are at the appropriate record type, copy the ID that appears at the end of the URL after the "=" sign.  
For example, a sample URL could be:

The ID for the weblead record type is therefore 012300000000MWm.

  • Open the .csv extract from the earlier step in Excel.

If your extract was generated by running a Data Loader Export, replace the existing RecordTypeIDs with the one just copied.

If your extract was from a Salesforce report, create a new column called "RecordTypeID" and populate all the rows in this column with the "RecordTypeId" just copied.

  • Save the csv file.

Next, run an update using the Data Loader. When prompted, load the .csv file from the previous step. Choose "Create or Edit a Map" when prompted. Drag the "ID" and "RecordTypeID" fields from the top section to the corresponding fields in the bottom section.

  • Select a directory to where the error and success files will be saved
  • Click "Finish" and the mass update is complete.

In Salesforce, check your records to confirm that the change has been made.

promote demote