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
Dr. Thomas MillerDr. Thomas Miller 

InvalidBatch : Entity type for the polymorphic foreign key reference: What didn't match the supplied type: Invoice__c

I try to upsert events using the Bulk API. The csv file looks like this:

---------------------------------
"Invoice__c:What.ExtId__c","Subject","OwnerId","Type__c","ExtId__c"
"INV_686850","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","00558000001bxV8","EMail","MSG_10022339"
----------------------------------
Invoice__c is a custom object - it has a field ExtId__c which is defined as unique external id.
Track Activities is enabled, and I can create new events related to an Invoice__c record.

Activity has a custom field ExtId__c added which again is a unique external id.

However, when I run a bulk job with the csv above, i get the error message

 <state>Failed</state>
 <stateMessage>InvalidBatch : Entity type for the polymorphic foreign key reference: What didn't match the supplied type: Invoice__c</stateMessage>