+ Start a Discussion

Loading Master-Detail relationships using the Data Loader

Hi all,

I have a quick question regarding the Apex Data Loader which you might be able to help me with. I've searched through the help and forums but have not found an answer.

I've created a custom object that has a Master-Detail relationship with the Account object and I want to be able to import these objects from a .csv file. The file contains the account data in the same line as the custom object data and what I want to do is to create mapping files within the Data Loader to load first the account data and then the custom object data which will be linked to the correct account.

When I use the Import Custom Object wizard, I am able to specify the column in the csv file to match to the account name and it imports the custom object and links it to the matching account with no problems. However when I try and use the Data Loader and map the same column to the master-detail relationship field, it fails with a message "Account: id value of incorrect type".

Is it possible to use the Data Loader to load objects with a relationship like this ?


Many thanks for your help,