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
Yogesh Shukla 26Yogesh Shukla 26 

Importing data into a junction Object Contact_Hobby

I have a junction object Contact Hobby which has Master detail relationship to Contact and Hobby objects.

I have to import data from csv file which has 2 columns  Contact Name, Hobby Name. How can I import this csv using import wizard or data loader.

Do I need to add id columns for the master records first ?

Mammu4Mammu4
Hi Yogesh,
First you need to load Contact records into "Contacts" and Hobby records into "Hobby" object. Then get the salesforce IDs of these records.
The junction object is link between "Contact" and "Hobby". Match your Salesforce IDs correctly.

Now you can import data into ContactHobby object, each record containing Contact ID & Record ID.
Hope it helps! 
-Thanks

 
Everett LebherzEverett Lebherz
Mammu, I'm assuming you use the data import wizard to upload to the junction object, or "Contact Hobby" object in the case above. In addition, are you adding a New record to the junction object in order to create the relationship?