S2S File Sharing Refer
1.What is Salesforce 2 Salesforce Connect ?
It is point-and-click integration tool that allows you to replicate data between 2 orgs.
Ex: Create account in one org and that should share with another org
2. All standard & custom objects records can be shared?
No,You can publish only certain objects
- Account
- Attachment (unencrypted)
- Case
- Case Comment
- Contact
- Lead
- Opportunity
- Opportunity Product
- Product
- Task
- Custom Object
3.Pros & Cons of S2S ?
Pros :
1.S2S allows you and your business partners to collaborate more easily and effectively.
2.You can share records with one or more connections.
Cons :
1.S2S can be between 2 sandboxes / 2 production org not between sandbox & production org.
2.You can’t accept forwarded records on the Salesforce mobile app.
3. You can not publish the look up Id's.
4. There is no upsert on the object 'PartnerNetworkRecordConnection',Only Insert can perform.
4.Explain with business use case ?
In real time,Consider a company acquired 2 different companies & Each has its own ERP system and then required to merge those systems,
Ex: Opportunity of one system should trigger to another system and the remaining business rules will trigger in other system.
5.Explain Steps for S2S implementation?
1.Enabling Salesforce to Salesforce (S2S),In both source & target org.
A new user named “Connection User” is created on the enable.
"Connection user" - Is the user that performs the actions on behalf of the shared connection
2.S2S integration user in Source & Target Org
3.Create Contact & Account in Source & Target Org - Use the same email id of the contact in both the orgs.
4.Setup a connection,The connection tab will be available only after S2S enabled.
5.Send Invite to the contact on the new connection establishment request,The contact of the source & target will be pointed to same email id,Consider this as "Connection User" exist in both orgs.If invite is accepted then connection gets established.
6.Publish Objects
7.Subscribe Objects & Auto-Accept
If Auto-Accept is not selected then administrator has to review the incoming records and then accept,
8.Field Mapping & Pick List Field Value Mapping (Click on the Edit Values to map)
9.Share Record By Forward To Connection
10.The shared record system info details,The created by is "Connection user"
11.External Shared Related List,If not available add to the page layout.
6.Is it possible to automate S2S configuration / Field Mapping ?
No. There's no SOAP, REST, Tooling, or Metadata object that represents a field mapping for S2S,
Either through manual / Scripting (Selenium)/ Browser Control Technique (UI Path).
Refer
7.How to know the status of shared record ?
If we select option "Send Email",It will send an email with the details of shared record / In case of any error while sharing the record that details will be sent & Same will be available in the "Connection History" of the connection.
8.Expected errors & Solutions ?
1.Insufficient Privileges on click of connection establishment link
Sln:Enable S2S in this org
2.Forward To Connections button not found
Sln:
-->The 'Forward to Connections' button is only visible when the User viewing the object list view has the 'Manage Connections' permission enabled either via the Profile or via a Permission Set.
-->Add that button in the Search layout -->List View Layout
8.What are the PartnerNetworkConnection & PartnerNetworlRecordConnection?
PartnerNetworkConnection
|
PartnerNetworkRecordConnection
|
This object represents a Salesforce to
Salesforce connection
between Salesforce organizations.
|
This object represents a record shared
between Salesforce organizations using
Salesforce to Salesforce.
|
9.How to share the record programmatically in S2S apart from using the 'Forward To Connection' button ?
------------------------------------------------------------------------------------------------------------------------
// Define Network id
String connectionName = 'SF_Bytes'
List<PartnerNetworkConnection> partnerNetConList =
[Select id from PartnerNetworkConnection where connectionStatus = 'Accepted' and connectionName = :connectionName];
Id networkId = partnerNetConList.get(0).Id;
// Send Parent & Child (Attachment File) programatically
PartnerNetworkRecordConnection newConnection = new PartnerNetworkRecordConnection(
ConnectionId = networkId,
LocalRecordId = '0010S00000OnyrK', SendClosedTasks = false,
SendOpenTasks = false, SendEmails = true);
insert newConnection;
------------------------------------------------------------------------------------------------------------------------