Loading

Change record values to blank or null with Data Loader

Publiseringsdato: Sep 25, 2024
Beskrivelse

By default, Data Loader will treat any blank cells in your CSV file as though no change is needed for that field. If you'd like to use Data Loader to remove the value of a fields so it will appear as blank or NULL, update the Data Loader settings to enable "Insert Null Values".

 

Løsning
Warning
Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to ensure the operation was successful through manually opening and verifying that the corresponding records are correct in Salesforce.


Include NULL values in an update

  1. Open Data Loader.
  2. Click Settings.
  3. Select Insert Null Values.null value.png 
  4. Click OK.

Note: Due to screen resolution settings, you may not see the OK button. The Enter or Return keys should save the settings if the resolution settings cannot be adjusted.
 

Example

1.  Run Export Data. Make sure to include IDs and any fields that should be changed to NULL.
2.  Delete data contained in the columns that should be returned as NULL (no values).
3.  Save the file as a new .CSV with new name. Don't overwrite the Data Export from step 1 so that you can keep it as a backup of your data.
4.  Run Data Loader Update using new file with Blank values.


Potential Issues

  • If the field being updated to NULL is referenced by a workflow or trigger, the update might not be successful. (One workaround you can try is to lower the batch size to 1, then proceed with the update or insert again).
  • If the field is Required in your organization, you will not be able to use this method to insert a NULL value. 


See also:
Data Loader behavior with Bulk API enabled using 'Insert null values'


Support videos:
How to Change Record Values to Blank or Null with Data Loader
How to Download and Install Data Loader

Knowledge-artikkelnummer

000385542

 
Laster
Salesforce Help | Article