+ Start a Discussion
dwickdwick 

Apex dataloader - importing csv to object with master-detail field

When importing records to a master-detail field it seems salesforce requires it be in the form of an id ('a0MQ0000000KYyJ' for example), however my csv file contains the primary key in string form ('R1005').  Is there a means of retrieving the id by using the string form of the key and still using the dataloader?  I'd like to stay away from programming my own loader with the API if i can.

dwickdwick

The best solution i've found so far is to export the master object first, and use it as a key for creating the csv.  If anyone has a better idea, let me know!

Nick34536345Nick34536345

If you have a custom field on the master object marked as an "external id" field, usuallydata loader gives you the option to use that, instead of having to use salesforce IDs.