Currently, I'm exploring salesforce to salesforce (S2S) and I have S2S setup on 2 of my dev orgs. I have read couple of examples on sharing/inserting records from one org to another, but I couldn't find any documentation or example pulling records from the S2S connection using SOQL like

SELECT id, name FROM account LIMIT 10

1 Answer 1


Salesforce to Salesforce wasn't designed to pull records only to push them. Which from a security standpoint is probably a good thing. If you are sharing accounts with another org you probably only want them to have access to the accounts you share with them.

However if you want to push a set of records to the other org using a SOQL you could write an APEX script to accomplish this by creating new PartnerNetworkRecordConnection records for the results of your query.

An example of how to do this can be found here: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_partnernetworkrecordconnection.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .