function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
das61das61 

Salesforce to Salesforce (S2S) Link to Existing Opportunity

PROBLEM:  I'm setting up S2S for opportunities.  I have several thousand opportunities that already exist in both orgs. I can manually link to an existing opportunity in the target org when I manually accept the opportunity. I would like to programatically link those opportunities.  

QUESTION:  If I provide the target opportunity ID in a mapped field on the source record, can I use a trigger to automatically link from the source to the target opportunity?  This is really a one time event.  If this is not possible, are there any other solutions?

All replies are appreciated.
SandhyaSandhya (Salesforce Developers) 
Hi,

See this link which has sample code for a trigger on the opportunity.

https://developer.salesforce.com/forums/?id=906F00000009FOLIA2


Please refer below links to get more information.

http://www.simplysfdc.com/2013/05/salesforce-to-salesforce-how-to-start.html

https://developer.salesforce.com/forums/?id=906F000000093V3IAI
 
https://developer.salesforce.com/forums/?id=906F0000000AVdBIAW
 
https://developer.salesforce.com/forums/?id=906F000000092RKIAY
 
Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
 
Thanks and Regards
Sandhya