SALESFORCE #TIPS – Insert null in a number field with Data Loader (especially in BULK API mode)

When you import data in Salesforce, you can naturally force the insertion of null values in Data Loader, when your data require it (fields filled in on certain records, but left empty for others).

In this case, when you leverage the REST API, in Data Loader, you can check the option to be able to insert null values :

But, when inserting data with BULK API, you do not have the possibility to force the null values, as you can see in the screenshots below :

  • when clicking the Bulk API option…
DataLoader settings – « Use Bulk API » option enabled
  • …then immediately the « Insert null values » option is grayed out, and you cannot check it anymore
DataLoader settings – the « insert null values » is grayed out, when « Use Bulk API » is checked

To be able to insert data, in Bulk mode, with fields filled in with null values, you have to edit your CSV file, and replace the null values or empty values by the #N/A text, as you can see in the example below :

DataLoader settings – CSV file with #N/A value to insert null values in BUL.K API mode

Enjoy you fast data imports with BULK API


To read more on the subject :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *