Monday, January 16, 2012

Mass Delete Field Values in Salesforce with Apex Data Loader

This is a quick little trick that was giving me trouble recently so I figure I'd share.

I wanted to mass delete field values in Salesforce.com. The initial plan was to just create a load file that contained salesforce Id's and header's but no values for the records. The idea is that it updates the field with the blank value that is listed. After a couple try's this was not working at all, it said that all items were successful, but no field values were being deleted from Salesforce.

Here is the solution: I used the exact same file with Salesforce Id's and blank values for every record. However in APEX Data loader you have to go into the Settings and click the check box called "Insert Null Values". Then load them up and it will clear out the contents of the fields!


In Short:
Settings > Check "Insert Null Values"
Run an update on Salesforce Id's with blank cells

1 comment:

  1. Insert null values! Awesome!! Thank you so much :-)

    ReplyDelete