Heroku-Connect 与 Postgres 和 Salesforce:新行未同步

问题描述 投票:0回答:2

我正在尝试使用 Heroku Connect 将 Postgres 数据库与 Salesforce 集成。 目标是将更多数据从 DB 添加到 Salesforce。 连接后,我可以在 Postgres 中看到来自 Salesforce 的更新。 我可以更新 Postgres 中的现有帖子并在 Salesforce 中查看它们。 我可以在 Leeds、Accounts 和 Contacts 等表中创建新记录,并在 Salesforce 中查看所有更新。

机会表的问题 我设法从 Postgres 更新现有记录,但无法创建新记录以与 Salesforce 同步。 IE。生成但更新不会发送到 Salesforce。 得到的错误是:

{"op": "INSERT", "src": "SFDC", "msg": "We can't save this record because the \u201cOpportunity - Owner Assignment\u201d process failed. Give your Salesforce admin these details. This error occurred when the flow tried to update records: INVALID_CROSS_REFERENCE_KEY: Owner ID: owner cannot be blank. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1878853328-1317082 (142283924)k up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1878853328-1317082 (142283924)"}

即错误告诉我ownerid 为空。但这个字段不为空,因为我给出了正确的ownerid值。

INSERT INTO salesforce.opportunity ( name , closedate, stagename, createdbyid, ownerid )
Values('zzzz' ,'2021-12-31','New', '0051t000002VZvKAAW','0051t000002VZvKAAW' )

enter image description here

在 Heroku 中这样连接: enter image description here 可能是什么问题??

postgresql salesforce heroku-postgres heroku-connect
2个回答
0
投票

从报告的错误来看,您似乎在机会对象上配置了流程。 检查流逻辑以查看发生的下游更新可能会产生此错误,或暂时禁用流以验证插入是否按预期工作。


0
投票

如果有人在 Heroku 数据库中创建记录后在 SF 中创建/更新记录时遇到问题,您需要在映射到 Heroku DB 的 SF 对象中拥有一个

Unique
External ID
字段。当然,您还需要将该字段添加到映射并选中
Write database updates to Salesforce using...
并选择该字段。 enter image description here

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.