1

I have a production environment of Salesforce.com with huge data (more than 15,000 records) .. I bought Developer Pro Sandbox and created it. Now, I want to move my data to this Sandbox as it to do some tests on it. I exported All records of each object from production salesforce using Data Loader application. But when I import these files to Sandbox the IDs changed and the relations (lookups fields) got errors.

How can I solve this problem?

1 Answer 1

4

The Ids will change because you are creating new records in the developer sandbox. I have found the easiest thing to do is to:

  1. Create a productionId ExternalId field in each of the parent objects.
  2. Import new parents and match original Id to productionId field
  3. Upset children records and relate them to parent with original parentId matched to productionId field.
7
  • 3
    That's what I was going to say. Upsert can save countless hours of effort, and you get the side effect of knowing what record in production is related to in the Dev org. The only downside is that objects that don't support custom fields (e.g. AccountShare) may still need to be transformed manually, if you're getting that granular.
    – sfdcfox
    Sep 7, 2015 at 16:36
  • I created productionId field into Account object, and Imported (insert) accounts using Data loader with mapping productionId to ID, now after I tried to upsert contacts (Dataloader not show productionId into list of matching key on contact) . what is the problem with my scenario ? Sep 7, 2015 at 16:56
  • @user3003810 did you make it an external Id field?
    – Jenny B
    Sep 7, 2015 at 17:00
  • yes I did @JennyB Sep 7, 2015 at 17:08
  • @user3003810 I use jitterbit but here are instructions for dataloader help.salesforce.com/… not sure if you need to refresh the objects or not in dataloader after creating a new field like you do in jitterbit
    – Jenny B
    Sep 7, 2015 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .