We are sharing data between two Salesforce orgs (Org1 & Org2) using S2S on a custom object called Shared__c with fields Name and Shared_Field__c. Both orgs are set up to publish the Shared__c object and the fields Name and Shared_Field__c to the other org. Additionally both orgs are subscribed and auto-accept the Shared__c object from the other org and map the Name and Shared_Field__c fields to the Name and Shared_Field__c fields in their org.

When a new Shared__c record is created in Org1 with Name="Test" and Shared_Field__c="New" a record is also created in Org2 with Name="Test" and Shared_Field__c="New" as expected. Additionally when we update Shared_Field__c="In Progress" in Org2 we see that Shared_Field__c="In Progress" on the related record in Org1. All of this is as expected.

However occasionally when we update Shared_Field__c to a new value in Org2 the update isn't reflected in Org1. When this occurs I can update Name="Test2" save the record, set it back to Name="Test" in Org2 and then look back at Org1 and see the update to Shared_Field__c is now reflected in Org1.

Note there are data validation rules in Org1 on the Valid__c field of the Shared__c record. However the Valid__c field is not being changed after the record is created so that seems like it would be a non-issue.

I am at a loss as to what is causing this intermittent failure to push updates from Org2 to Org1. Ensuring the data in Org1 and Org2 is critical. Aside from setting up a field called Bogus__c on Shared_Field__c and setting up a Scheduled Apex job to update Bogus__c on a nightly basis I am at a loss for a way to ensure the data is in sync.

We opened a case with Salesforce Support over a year ago and they not only haven't been able to identify the cause but they have also often been unresponsive.

I am wondering if anyone else in the community has experienced S2S intermittently not sharing data. If so were you able to identify the cause of the failures?

Any insight would be greatly appreciated. Thanks!

  • no triggers involved on either source or target org? PartnerNetworkRecordConnection object for record in question looks good? No data-specific validation rules on Org1?
    – cropredy
    Commented Jan 29, 2015 at 1:00
  • @crop1645 What makes a PartnerNetworkRecordConnection object for the record in question look good or bad? Note that even though an update to Shared__c record fails a subsequent update to the record succeeds without any change being made to the PartnerNetworkRecordConnection object.
    – sfelf
    Commented Jan 29, 2015 at 15:46
  • @crop1645 I believe the data validation rules in Org1 are a non-issue as they are on a field whose value doesn't change after the Shared__c record is created. There are update triggers on the Shared__c object in both Org1 and Org2. Does having a trigger on the object cause issues with S2S or only if the trigger fails?
    – sfelf
    Commented Jan 29, 2015 at 16:09
  • PartnerNetwork RecordConnection for a given object would indicate via the Status field if the connection was suspended or still active. Given that you can resend the value again, this is at best, an unlikely possibility. If the trigger failed, there would be an issue. Possible related items: stackoverflow.com/questions/11444381/…; help.salesforce.com/…
    – cropredy
    Commented Jan 29, 2015 at 17:20
  • @crop1645 So a "good" PartnerNetworkRecordConnection would be one that is still active. Then that is definitely not the case unless some weird bug in SF is setting it to inactive and then setting it back to active. If a trigger failed I would expect to get a Apex script unhandled trigger exception email and I am not seeing those either so I suspect that isn't the case either. That said I will take a closer look at that code to be sure there isn't a way the trigger could fail. Any other thoughts?
    – sfelf
    Commented Jan 29, 2015 at 20:50

1 Answer 1


Looks like Salesforce to Salesforce syncing can fail if two updates to the same record occurs within a short time frame. It seems that this issue is caused by a problem in the way their core messaging queue works.

As I understand it, if an update message has already been queued for a particular record when another update occurs to the same record, another message is not added to the queued. When an update message is picked up from the queue the current state of the record is queried and that data is synced via S2S. This would all work just fine if the message was removed from the queue before the data was queried.

Unfortunately the message isn't removed from the queue until the sync via S2S is completed leaving a small window where updates will get lost. This seems like it would be a rare event and Salesforce even states that in their known issue report. That said I have seen it occur many times a week.

For more details on the known issue please take a look at: https://success.salesforce.com/issues_view?id=a1p300000008XwxAAE

Also if you believe you have been affected by this issue please click the "This Issue Affects me" button on the known issue report. Thanks!

  • impressive diagnosis
    – cropredy
    Commented Feb 25, 2015 at 2:47

You must log in to answer this question.

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