+ Start a Discussion
Bridget BrownBridget Brown 

Salesforce to Salesforce (S2S) Visualforce Page

I would like to build a VisualForce page to take the place of the Opportunities from Connections view for S2S so that I can add a couple custom fields to what is displayed.  However, I can't figure out where the data resides to get access to it.  The PartnerNetworkRecordConnection only shows that data that is shared and accepted.  How do I see the opportunity record data that is shared with my organization but not yet accepted?  Thanks!

ShashankShashank (Salesforce Developers) 
I'm afraid we cannot "Accept" shared records via apex/vf as per existing functionality. Unless you have Auto-Accept enabled, you may have to manually accept them from the Object's tab.
Bridget BrownBridget Brown
Hi Shashank.  Thanks for the reply.  Salesforce Support told me it could be done but couldn't confirm where to get the data, but since Salesforce to Salesforce doesn't appear to be used by many, I wasn't confident in the answer.  We are using S2S for a large volume of opportunity records and the ability to add an additional custom field from the source org to the view list while manually accepting the opportunities would make a world of difference.  

Is there any way to link the opportunities between our orgs without going through the acceptance screen?  We have 5000+ opportunities that exist in both orgs that need to be linked. Once we have these opportunities linked up, the need isn't as great.

Also, is there any way to query the opportunities that are shared with my organization but not yet accepted?  Any help appreciated.
ShashankShashank (Salesforce Developers) 
You can setup records to be auto accepted: https://help.salesforce.com/htviewhelpdoc?id=business_network_subscribe_to_objects.htm&siteLang=en_US

You can query the PartnerNetworkRecordConnection object in the source org on the status field with value "Pending (sent)". Here are the different values that the status field can have: https://help.salesforce.com/htviewhelpdoc?id=business_network_record_status.htm&siteLang=en_US