+ Start a Discussion

Automatic deletion of Opportunities in S2S when deleted in master Org

Hi all,


A client of ours is using Salesforce2Salesforce.

They want to maximize the automatic sync of Opportunities from org A to org B.


I've set up an automatic forward through a trigger on Opp in org A.

What I'm struggeling with is the automatic deletion of shared Opps in org B that were deleted in org A.

When you delete a shared Opp from org A, the link between the 2 is cut, more specific: the PartnerNetworkRecordConnection record is set to Inactive in org B

But I cannot catch this event in org B.

The Opp itself doesn't change, so I cannot use a trigger on Opp.

PartnerNetworkRecordConnection doesn't allow for trigger.


I could write a batch that regularly cleans up Inactive Opps, but maybe there is more elegant solution?


Best Regards,