使用externalID的Pentaho salesforce upsert

时间:2014-07-02 09:56:53

标签: salesforce pentaho upsert

我正在尝试使用upsert在salesforce中插入数据,对于我正在使用ExternalId字段的一个字段,我尝试了很多组合但它失败了...我得到错误:语法应该是对象:externalId / lookupField < / p>

知道确切的语法是什么?请记住,我在表中插入帐户,而externalId字段也指向帐户

1 个答案:

答案 0 :(得分:1)

object:externalId/lookupField不是很清楚。 Pentaho代码中隐藏着comment

        // We use an external key
        // the structure should be like this :
        // object:externalId/lookupField
        // where
        // object is the type of the object
        // externalId is the name of the field in the object to resolve the value
        // lookupField is the name of the field in the current object to update (is the "__r" version)

假设您正在填充Salesforce对象Foo__c,该对象有一个名为Contact__c的联系人查询字段。然后,该查找字段的“关系名称”将为Contact__r。 On Contact假设您已添加名为Legacy_Id__c的外部ID,这就是您在填充Foo__c时要使用的内容。

Pentaho在Module Field列中想要的是:

Contact:Legacy_Id__c\Contact__r

斜杠左侧的位告诉Pentaho要映射到哪个对象/外部id。在斜线的右侧,它告诉Pentaho在Foo__c上填写哪个查找/关系。