使用外部 ID 引用更新到 Salesforce 无效

Upsert to Salesforce with External ID references Not Working

我在 Salesforce 中有以下具有相应字段的对象:

Prospect__c Data_Migration_ID__c(外部 ID)

Marketing_Source__c Data_Migration_ID__c(外部 ID)

Lead_Source__c Data_Migration_ID__c(外部 ID) Prospect__c(参考Prospect__c) Source__c(参考Marketing_Source__c)

在潜在客户源的源数据 (CSV) 中,我在 Lead_Source__c.Prospect__c 和 Lead_Source__c.Source__c 中分别具有潜在客户和营销源的外部 ID。我已按照 http://blog.wdcigroup.net/2013/10/talen … component/ 中的说明以及我在论坛中找到的任何提示进行操作,以加载我的 Lead Source 数据。我可以让它与数据加载器一起工作,所以我知道数据是有效的。但是每当我 运行 这份工作时,我都会得到以下输出:

Exception in component tSalesforceOutputBulkExec_1_tSBE
[AsyncApiException  exceptionCode='InvalidBatch'
 exceptionMessage='Records not processed'
]

    at com.sforce.async.BulkConnection.parseAndThrowException(BulkConnection.java:108)
    at com.sforce.async.BulkConnection.doHttpGet(BulkConnection.java:472)
    at com.sforce.async.BulkConnection.getBatchResultStream(BulkConnection.java:369)
    at org.talend.salesforceBulk.SalesforceBulkAPI.getBatchLog(SalesforceBulkAPI.java:428)
    at test.lead_source__c_0_1.Lead_Source__c.tFileInputDelimited_1Process(Lead_Source__c.java:2132)
    at test.lead_source__c_0_1.Lead_Source__c.runJobInTOS(Lead_Source__c.java:2839)
    at test.lead_source__c_0_1.Lead_Source__c.main(Lead_Source__c.java:2688)

我正在使用 Talend 5.5.1.r118616-20140617-1110

我找到了答案。

http://blog.wdcigroup.net/2013/10/talend-tsalesforceoutputbulkexec-component/ 处的说明是正确的,但我引用了错误的 field.When 说明说要转到 tSalesforceOutputBulkExec 组件上的“高级设置”选项卡,它说 "the ‘Lookup field name’ is the lookup field between the Contact and Account objects in the Salesforce. Hence, it will be the Account field in Contact object."我使用 "Prospect__c" 和 "Source__c" 作为我的查找字段名称。我应该一直使用 "Prospect__r" 和 "Source__r,",因为它们似乎是实际的查找字段——至少对于这些自定义对象而言。

我们曾经有 Pervasive,它允许我们使用语法“(Object:ExternalID:Value)”[例如,“(Prospect__c:Data_Migration_ID__c:1)”]作为插入语句中的值。我从来没有处理过参考字段,但我在一些 Salesforce 开发人员博客和论坛中发现了一些关于它们的注释,并认为值得一试。