How to Insert Null or Blank Values with the Salesforce Data Loader

In Salesforce, we have a robust data management tool, and that is Salesforce data Loader. It handles the mass or bulk data operations very efficiently. One such feature is that the data loader overwrites a field that currently has a value and inserts a blank or null value.

The process of inserting a null value results in deleting the value of a single field using the Data Loader on a batch of records. In this Salesforce tutorial, we will learn to insert null or blank values in Salesforce using a data loader.

The insertion of blank or null values is done with the help of the Data Loader update operation.

Insert Null or Blank Values with the Salesforce Data Loader

To insert null or blank values with the Salesforce Data Loader, make sure you have installed the data loader in your system and have the required access to update the data of the records.

In this example, we will take a few lead records, and there, we will insert the values of the Lead Source field as blank for the selected leads.

For reference, you can export the Lead object data with the fields ID, Lead Name, and the fields in which you have to delete the value or enter them as blank.

In this example, I will enter a blank value in the field Lead Source.

Enter Blank Values with data loader in Salesforce

Now delete the fields that you want to keep blank or null and save the CSV file for the update operation.

Enter Null Values in Object fields with Salesforce Data loader

Now, we have created the CSV file that we will use to update data and insert null values in the object fields.

See also  Associate Products to Standard Price Book and Custom Price Books via the Data Loader in Salesforce

After this, follow the below steps to insert Null or Blank Values with the Salesforce Data Loader.

1. Open the Data Loader wizard and log in with your credentials.

2. In the Data loader, go to the navigation bar and select Settings -> settings.

3. In the Settings window, activate the checkbox Insert null values, then click on the OK button.

Insert Records fields with blank value using Data loader

4. Now click on the Update button in the Data Loader.

Insert blank values in field values with Salesforce Data Loader

5. In this step, select the object in which you want to insert the blank values in the fields. In this example, I have selected the Lead object, and after the object, select the CSV file that we have created above to run the update operation.

After this, click on the Next button.

Insert Null Values with the Salesforce Data Loader

6. As we click on the Next button, the CSV file will be initialized and we can view the number of rows of the file and the batch size. Here, click on the OK button.

Salesforce Data loader update operation to insert blank value

7. In this step, we will do the mapping between the column headers of the CSV file and the object fields. For mapping, click on the button Create or Edit a Map, then in the next window, click on the button Auto-Match Fields to Columns.

Now, the fields will be auto-matched with the object fields, and after this, click on the OK button and, at last, click on the Next button to proceed.

Insert Records fields with Null value using Data loader

8. In this step, select the location for the success and error file from where it can be accessed later, and this file will show the successes and errors that occurred during the update operation.

See also  Mass Update Territory on Opportunity records via Data Loader in Salesforce

At last, click on the Finish button.

Use Salesforce Data loader to insert blank value in records

9. As we click on the Finish button, we will get a warning message for the update operation. Here, click on the OK button to proceed.

Insert Blank values with Salesforce Data Loader

10. After the completion of the operation, we can see the message of successful updates and errors that occurred in the update operation.

Here, click on the button View Successes to view the updated records.

Insert Null Values with Data Loader in Salesforce

As we click on the View Succeses, the Data Loader CSV viewer will open, where we can see the updated status of the records.

Insert fields with blank values using Salesforce data loader

We can see that the field Lead Source is inserted as blank in the selected lead records, and we can also view these changes in the Leads record page.

I will open one of the lead records, Kristen, in which we have inserted the field Lead Source as a blank value.

Salesforce Blank field insertion with Data loader

As we can see, the selected field is successfully updated with a blank value.

In this way, we can insert blank or null values with the Salesforce Data Loader.

Conclusion

In Salesforce data, inserting the blank value can be a very hectic task if we do it manually. Though we have tools like Data Import Wizard for this, the Salesforce Data Loader is more efficient in performing update operations like inserting null values for mass records.

By following the above steps, you might have understood the whole procedure of inserting null values with data loader in records, where we discussed creating a CSV file, mapping objects, and then running the update operation.

You may like to read: