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
RamanaRamana 

Setting Foreign Key using external id in Bulk API

hi All,

I am trying to use Bulk API and I have a scenario while upserting a Contact record I need to add reference to  Account using External ID. I did this using regular WebService API, but unable to do the same using Bulk API

 

as com.sforce.async.SObject does not have a method setField(String fieldName, SObject value). I was able do this with com.sforce.soap.partner.sobject.SObject

 

Any help or suggestions on this is appreciated.

 

Thanks in advance,

Ramana Maddikunta 

 

jesperfjjesperfj

Bulk API supports two data formats in batches, XML and CSV. Referencing relationship fields is currenlty not supported in XML, but it does work in CSV. Just use the same format for the field name in the header row as Data Loader uses: account__r.externalIDfieldName__c

 

We're working to ensure parity between XML and CSV.

 

po3211po3211

Any time frame on when the XML format will support this? I notice the documentation claims it currently does, but it doesn't actually work.