Use case: I need to update all related opps in our org if their parent account was successfully shared through S2S (Sharing status = "Active (sent)". The account record on our side's not updated when sharing was successfull.

The only way I see is to write a scheduled batch to check if accounts were shared and if so - update related opps, but the disadvantage is that the update will be not instant. Is there another way to do what my requirement needs?

  • Salesforce doesn't allow to create trigger on PartnerNetworkRecordConnection. I guess batch class is your best bet.
    – Mahmood
    Commented Mar 9, 2017 at 12:12
  • I do however, got an idea. You can create a boolean field on Account on both sides, subscriber and publisher, call it isS2SRecord. So, while pushing the Accounts from publisher, set this field True and then have a trigger the subscriber end on account with afterInsert event. Check if the field isS2SRecord has True value then perform your tasks.
    – Mahmood
    Commented Mar 9, 2017 at 12:20

1 Answer 1


One way of developing a synchronous solution is to create a boolean field, call it isS2SAccount on both sides, subscriber and publisher. Don't make them as editable on pagelayouts.

In the publisher part of your connection, where you set fields, make sure you select this field.

Then on subscriber side, create a trigger on Account object, afterInsert and check if the Account that is coming in the trigger has the isS2SAccount field value True, and then you can update your related Opps inside that code block.


You must log in to answer this question.

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