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
MATTYBMEMATTYBME 

Automate Sharing Cases Externally through Salesforce 2 Salesforce?

Is there a way to automate the external sharing of Cases via Salesforce2Salesforce? We want to be able to share all Cases with an external company as they are created.

 

It does not seem it is possible through Workflow but is it possible through say Apex? If so how would this look?

shillyershillyer

You can use Apex Code to automatically forward a case on creation, take a look at the PartnerNetworkRecordConnection object and the sample code. And your partner company can auto-accept these records as of Summer '09.

 

Hope that helps,

Sati

MATTYBMEMATTYBME

So the Sample code needs to be inside an Apex Class within a Public Class on Cases?

 

List<PartnerNetworkConnection)> connMap = new List<PartnerNetworkConnection>([select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection where ConnectionStatus = 'Accepted']); for(PartnerNetworkConnection network : connMap) { PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection(); newrecord.ConnectionId = network.Id; newrecord.LocalRecordId = caseID; newrecord.SendClosedTasks = true; newrecord.SendOpenTasks = true; newrecord.SendEmails = true; insert newrecord; }

 

 

 

shillyershillyer

I'd use a trigger, so as soon as the case is created, it's forwarded.

 

Best,

Sati

Chirag MehtaChirag Mehta

Grt to hear this. So finally there's something out like Automated S2S.

 

I was developing the same solution using Apex Webservices and Apex Callouts  http://community.salesforce.com/sforce/board/message?board.id=apex&thread.id=15541&page=1&view=by_date_ascending

 

Anyhow this solves my query, thanks for complete solution with code! 

Chirag MehtaChirag Mehta
We too got a solution finally for Automated S2S using Apex Callouts to Apex Webservices feature ..
http://community.salesforce.com/sforce/board/message?board.id=apex&message.id=16915#M16915
AlexPHPAlexPHP
I have enabled Salesforce to SalesForce on two developer instances and have started to share some Account records from one to another.

However, I am unable to see any PartnerNetworkConnection object on the Apex Explorer. Therefore, queries against it such as that of the examples on the PartnerNetworkConnection page fail.

How am I able to access that object to implement the automatic forwarding implementation that you guys are referring to?

Thank you
Chirag MehtaChirag Mehta

Did you tried to access the object using APEX Code. Also note on the line stating that this feature is supported from Summer'09.

 

 

hxnhxn

Check out AppExchange app Hubcase for Salesforce. It allows you to escalate or share cases to partners not using salesforce as well as those who are using salesforce. Clean separation of your customer interactions from partner interactions. No S2S required.