Heroku-Connect with Postgres and Salesforce : The new rows are not synchronized - postgresql

I'm trying to use Heroku Connect to integrate a Postgres database with Salesforce.
The goal is to add more data from DB to Salesforce.
After connecting I can see updates from Salesforce in Postgres.
I can update existing posts in Postgres and see them in Salesforce.
I can create new records in tables like Leeds, Accounts and Contacts and see all the updates in Salesforce.
The problem with the Opportunity table I manage to update existing records from Postgres, but can not create new records to synchronize with Salesforce.
I.e. produces but updates does not go to Salesforce.
The error obtained is:
{"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)"}
I.e. error tells me that ownerid is blank. But this field is not empty because I give the correct values of ownerid.
INSERT INTO salesforce.opportunity ( name , closedate, stagename, createdbyid, ownerid )
Values('zzzz' ,'2021-12-31','New', '0051t000002VZvKAAW','0051t000002VZvKAAW' )
In Heroku connect this like that:
What could be a problem ??

From the error reported it appears you have a flow configured on the opportunity object. Check the flow logic to see what downstream updates are occurring that could produce this error, or disable the flow temporarily to verify your insert works as expected.

Related

Error when creating table in BigQuery Google cloud console

I followed this tutorial to export my firestore collections to excel
https://www.youtube.com/watch?v=3J1M1bSwgV8
Ive followed it before and it worked
Now, Iam not being able to make it work. I followed all the steps, but in the end, when I need to create the table, im getting the erro
Failed to create table: Entity "ycCJePRLCrkHXkQyJ9nn" was of unexpected kind "patients".
What I've been successful to do:
– create bucket and export collection in https://console.cloud.google.com/firestore/import-export
– create dataset in https://console.cloud.google.com/bigquery?project=root-catfish-299022
The next step would be to create the table, in which im getting the error

Supabase how to query the same table twice

I have been experimenting with Supabase recently and trying to make a twitter like 'replying to #user' comment feature.
So I have a database ERD attached below for reference, As you can see each comment has a userid and also a 'replyingTo' which also stores the userid of the comment which is being replied to.
Now I'm able to query individually between these two tables, So I can get the user of comment along with the comment very easily but however, When I'm trying to fetch the user profile of the comment creator and the profile of replyingTo, I get the following error -
Could not embed because more than one relationship was found for 'Comments' and 'profiles'
I'm not too experienced at PostgreSQL so I'm not sure how to do something of this scope, This is the following code I'm using currently which is giving me the error I have described above.
const { data, error } = await supabase
.from('Comments')
.select('ReplyingTo, profiles:profiles(id), profiles:profiles(id)')
.eq('commentid', cmtid)
My expected outcome is to get the comment, the user profile who created the comment and also the profile of the user who is receiving a reply.
Thank you for your time and patience.
As the error says, the problem is that you have two relationships between profiles and Comments. For this case, you'd need to disambiguate(which foreign key column you want to use for the join) as specified in the PostgREST docs. For the supabase js client, it should be like:
const { data, error } = await supabase
.from('Comments')
.select('ReplyingTo, profiles1:profiles!userid(*), profiles2:profiles!ReplyingTo(*)')
.eq('commentid', cmtid)

Can't find data record in database table course_categories in moodle

[I'm getting this error in my moodle][1]
And I can't go in any activity like security and any other activity so I can solve
[1]: https://i.stack.imgur.com/83ofA.png

Get Outreach Activity data from ORN via SOAP calls

I use Oracle RightNow via SOAP API.
Using QueryCSV option, I can get a lot of information (E.g.: about an incident SELECT * FROM Incident WHERE ...), but I don't know how to get information about Outreach Activity.
I saw on the RightNow forum that I could get this kind of information from ma_trans table, but I don't know how to select data from this table.
Outreach Activity tab that should show data from the ma_trans table
I tried different approaches, but I always get responses like this:
Request:
SELECT * FROM ma_trans
Response:
...
<n0:RequestErrorFault xmlns:n0="urn:faults.ws.rightnow.com/v1_3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<n0:exceptionCode>INVALID_REQUEST</n0:exceptionCode>
<n0:exceptionMessage>no such table: ma_trans</n0:exceptionMessage>
</n0:RequestErrorFault>
...
or
Request:
SELECT Contact.ma_trans FROM Contact
Response:
...
<n0:RequestErrorFault xmlns:n0="urn:faults.ws.rightnow.com/v1_3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<n0:exceptionCode>INVALID_REQUEST</n0:exceptionCode>
<n0:exceptionMessage>Non-existent column: 'ma_trans'</n0:exceptionMessage>
</n0:RequestErrorFault>
...
How can I get information about Outreach Activity and how can I get data from this ma_trans table?
The ma_trans table is not exposed through the Connect Object Model or ROQL. transactions is exposed through ROQL, as well as some of the other "managed tables", which you can view in any of the documentation for services that expose connect APIs (i.e. the PHP, SOAP, REST, etc. APIs).
You could get this data by creating a report to query for the data that you need, and then use the runAnalyticsReport method to get data from the report. But, since ma_trans can contain a lot of data, be sure that your report is filtered properly as to not extend beyond run time or data threshold limits.

VSTS Get ID of Stored Queries

I am trying to execute a VSTS stored query using WorkItemTrackingHttpClient
The stored query is identified by it's ID and there are code samples to programmatically get this ID. However, I can't seem to figure out how I can get this ID within VSTS online view. Clicking on the query lists the workitems returned bye this query but the query ID isn't listed anywhere. Is this due to privileges of my authentication or I am overlooking something.
You can get the query ID in the URL:
Select a query
The URL format will be like: https://[xxx].visualstudio.com/[project]/_queries?id=effb4d62-1b9b-42e9-af7c-dbef725fca4a&_a=query.
The id is the value of id parameter.