Saturday, February 27, 2016

DataLoader: Understanding External ID

Recently, I had to integrate data using file based approach  with an external legacy system. The frequency of this integration was supposed to be daily. Circumstances, did not allow for the legacy system to store Salesforce ID in their system and send it in their extracts.

So, how do you know at your end whether to insert or update when using DataLoader?

Solution

In comes External ID, it allows you to mark a field as unique in Salesforce; prevent duplicate records from getting created and allows the DataLoader to decide whether to insert or update a record.

Launch DataLoader and select the Upsert Operation to be executed, select your object and for the field to be used for matching point to the External ID field.

Salesforce will use the External ID field as a key and decide whether to update or insert.
You can have multiple External ID fields for an object. You can also use it against lookup fields to populate ID from your lookup object. It is case insensitive unless you select the Case sensitive option when defining the field.

No comments:

Post a Comment