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
alaschgarialaschgari 

Salesforce to Salesforce: PartnerNetworkRecordConnection RelatedRecords don't work

Hey folks,

 

I've written an after insert, after update trigger that automates forwarding accounts and related contacts/opportunites to a partner org. The account itself is forwarded correctly, but the related contacts and opportunities don't get transferred...

 

Here's a debug log of the PartnerNetworkRecordConnection object:

 

10:21:35:359 USER_DEBUG [20]|ERROR|### objectConnections: (PartnerNetworkRecordConnection:{ConnectionId=04Pd0000000PXXXXX, SendEmails=true, SendOpenTasks=false, LocalRecordId=001d000000ViOQ3AAN, RelatedRecords=Contact,Opportunity, SendClosedTasks=false, ParentRecordId=null})

 

What's the problem?

Thank you for your support!

kiranmutturukiranmutturu

did you put a  statement like below in your code......

 

PartnerNetworkRecordConnectioninstance.RelatedRecords = 'Contact,Opportunity';

alaschgarialaschgari

kiran_mutturu wrote:

did you put a  statement like below in your code......

 

PartnerNetworkRecordConnectioninstance.RelatedRecords = 'Contact,Opportunity';


Yes, I did.