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
Tjd440Tjd440 

Sharing a Task over S2S with an non-shared parent.

This one is a bit wierd, but what we need to do is share a task over S2S from Org A to Org B using a trigger, however org B doesn't have the Task's parent object.  So, we need to somehow re-assign the tasks parent at Org B, yet somehow maintain the by-directional sync provided by the PartnerConnection(s2s).  We are trying to do this by the following, but I get a generic "INVALID_PARTNER_NETWORK_STATUS, invalid status for partner network operation: []" error.  Ie..

(Org A Task Trigger)

PartnerNetworkRecordConnection pnrc = new PartnerNetworkRecordConnection();    
pnrc.ConnectionId = connectionId;
pnrc.LocalRecordId = task.Id; // Tasks real local ID
pnrc.ParentRecordId = child.Id; // Not the tasks real parent, but another object visible to Org B
insert pnrc;

Should this work, and/or is there an alternative to re-assigning the parent on the OrgB side of the share?
Gaurav NirwalGaurav Nirwal
Srikanth Challa 3Srikanth Challa 3
I have the same Issue. Did you find the Solution?