我正在尝试使用 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' )