function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
m.thomasm.thomas 

Cross-org Data Loader Issues

When inserting new records via the data loader to an org unrelated to the org from which the data was originally exported, I receive errors concerning the id references that each record contains within the original org (cross reference id error).  From my understanding, this is caused due to the fact that the records that are referenced do not (yet) exist in the destination org.

 

A specific example:  In the destination org, the desired result is for all records (Accounts, for example) retain their original record owner; the users will also be transferred over.  Also, I would like to ensure that contacts remain related to their respective accounts and so on and so forth for other objects.  I have several questions that I need to find answers for:

 

1.  What is the best practice for dealing with these id issues?  I have conceived of several plausible solutions, but I am unsure which are most efficient.  a) Insert all of the account records and allow them to default ownership to me (the admin) by leaving the owner field unmapped during loading; then, mass transfer to the appropriate users b)  Import the users first and then manicure the CSV file to ensure that the proper ids are present for each account (using the find and replace all features in excel).  Both of these conceived plans seem somewhat tedious, though.  Is there an easier way?

 

2.  Is there some sort of method centering around a field that I can add in that would solve these problems?  For example, "Old record owner".

 

3.  Would someone outline the steps taken while using the data loader?  I'm wondering if I need the command line, for example, or if I'm mapping the fields incorrectly to cause these errors.  Lastly, should I be using some other function of the data loader such as upsert?

 

Thanks in advance for any help.

Devendra@SFDCDevendra@SFDC

 

Hi m.thomas,

 

In Salesforce ,the id of any record is unique ( generated by salesforce), Therefore the record id from one org can not be used in another org.

 

I am not sure about your requirement. But i guess you want to transfer records from one org to another org. Please let me know, if i am wrong considering your requirement.

 

Instead of working cross referencng using you can use External Id concept. Set one of the field as External Id (It is possible on three datatypes : Text, Number, Email : Only three fields are allowed per object to set as External Id). External Id would be helpful while Upsert.

 

To assign OWNER ID for the record, you will have to user unique id of that User. Data Loader needs Record Id to make references with other records.

 

Dataloader : http://wiki.developerforce.com/page/Apex_Data_Loader

 

Hope this helps. ;)

 

Thanks,

Devendra