• Sushree Biswal 10
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I am establishing S2S between two orgs . Org A (source Org) and Org B (Target Org)

 

Org A has an object (Object1) with look up on the two other objects (Object2 and Object3)

 

Object2 and Object3 are already externally shared with Org B.

 

while sharing Object1 , I am setting parentrecordid to Object2 so Object1 shows up correctly linked to Object2

 

but I am not able link Object1 with both Object2 and Object3 at the same time.

 

here is the code from the after insert trigger on Object1 in Org A.

 

stripped down code...

 

 

            PartnerNetworkRecordConnection newConnection = new PartnerNetworkRecordConnection (
            ConnectionId = networkId,
            LocalRecordId = obj1.Id, 
            ParentRecordId = obj1.obj2);

 

            insert  newConnection;

 

Thanks for your help.