If I move an Account from Production to Sandbox, then when it's time to move the Contacts from Production to Sandbox, then in Excel, in the Contact CSV, I just update the AccountID Cell with the new Account number that the Sandbox gave that account. That way, the Contact finds it's owner.

How do I do this for 100,000 accounts? I can't individually assign them all their new AccountID.

I'm just trying to find the path of least resistance and the best practice here.


  • For this reason you have to create an external id field and load your data. This way you don't have to get the id of the record always, you can keep this external id value consistent across orgs.
    – Raj
    Feb 25, 2020 at 19:50
  • In most cases it would be preferable to (automatically) create those accounts and contacts in your sandbox with fake data. However, that does depend on your use case
    – Kasper
    Feb 25, 2020 at 20:01
  • So you're saying create an ExternalID on Account, Opportunity, Contacts, Pricebooks, etc.? How would they update, do i have to save them all or does it automatically apply upon field creation? And is the ExternalID on account, going to be the exact same on that Accounts Opportunities, Contacts, Pricebooks, etc.?
    – Steve
    Feb 25, 2020 at 20:14
  • N.B. pricebooks will automatically copy when the sandbox is created/refreshed. You could also consider partial copy sandboxes
    – cropredy
    Feb 25, 2020 at 22:46

1 Answer 1


I found the answer from another source:

On the Account extract relabel the ID field to something else (ex. Prod_Id) then your success file from the import will contain the Prod_Id field. You can use that to do a vlookup on your Contact extract.

You must log in to answer this question.

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