Find your content:

Search form

You are here

Does Salesforce To Salesforce handle sharing privileges correctly


I have a requirement in which a source org needs to share data with N partner orgs. I'm considering using Salesforce to Salesforce (in addition to Middleware solutions). The source org contains an account for each partner org with contacts and custom objects underneath the accounts.

If I set up a sharing rule on Accounts, and share each account with a single partner, will only the appropriate records be synced / shared with the partner orgs correctly if the connections are owned by the partner user, or does S2S ignore sharing rules?

Attribution to: James Loghry

Possible Suggestion/Solution #1

I have not used a S2S connection yet, but was looking into it recently for an upcoming use case. According to Salesforce docs,

... There are two ways to share records: forward records directly to connections, or assign records to a queue of connections. You can share the same records with multiple connections. Once shared, connections must choose to accept the records.

The records are not sent based on sharing rules; you must take a specific action on each record to share it with your partner(s) - either manually on the record detail page or a list view for the object or with Apex - which means you control what the partners receive.

There are a couple articles on Developer Force that I found really helpful. An Introduction to Salesforce to Salesforce is an excellent guide that walks through the process of setting up and using connections from beginning to end. Best Practices for Salesforce to Salesforce details some specific use cases with a solution approach for each (heavy on the Apex side).

Attribution to: zjeh

Possible Suggestion/Solution #2

S2S sounds like a good choice for this. It works well. Couple notes:

  • doesn't sound like an issue for you, but some core objects (most painfully for us, Campaigns and Campaign Members) are still not supported.
  • S2S has no relation to sharing rules; as mentioned by zjeh, you either manually forward them (click a button in a list view) or auto-share via trigger. There are working code examples in the S2S documentation. In your case, manual forwarding should work just fine for N < 50.
  • if you or your partners delete shared records, S2S generates a somewhat unhelpful and annoying "Notification of deletions from [org]" email. It tells you how many records the source org deleted, but not what they were nor does it do anything about them. AFAIK there is no way to disable this email. It gets annoying when you're sharing large numbers of records, but doesn't sound like it will affect you.
  • round-trip field updates (again, not probably a problem for you) that are calculated via trigger don't automatically come back to the source org (posted a question here detailing the issue a while back).
  • if you run into issues with S2S, the great PMs who monitor the email box S2S at salesforce dot com are brilliantly fast to respond.

Attribution to: jkraybill
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content