+ 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.