+ Start a Discussion
Yogesh BiyaniYogesh Biyani 

Bulk API 1.0 insert related object using external id

How I insert a related object using the external id field on the parent object?

I have a custom parent object License__c and related object Activation__c which have a Related_License__c lookup field to the License__c object and the relations ship name is License Activations.

License__c has l_id__c external id field. I would like to import the Activation__c object using the l_id__c field so that the parent-child relationship is automatically created.

This works using the data import wizard but fails when I try to import use the Bulk Api 1.0 

Here is the sample CVS file 

Activation_Id__c,License_Activations__r.l_id__c 
9249,1665029 
9250,1665029 
Yogesh BiyaniYogesh Biyani
PS - The bulk job fails with "InvalidBatch : Unable to find relationship:" error message.

Yogesh