0

I am new in Salesforce to Salesforce (S2S).

I am trying to achieve a concept of share one record from one org with its related record.

I am trying to share Account record with its related "Line Items" custom object. Line Item object have Account lookup field.

I have written below code.

PartnerNetworkRecordConnection networkRecord = new PartnerNetworkRecordConnection();
networkRecord.ConnectionId = '04P1J000000fwAp'; // Connection org Id.
networkRecord.LocalRecordId = ''; // Account record Id.
networkRecord.RelatedRecords = 'Line_Item__c'; // Related record object API name.

That works fine.

Now I have created a new custom object called "Test Object". which have account lookup field and now I want to share this test object with Account record. So, I have change related record value in about call. Like below,

PartnerNetworkRecordConnection networkRecord = new PartnerNetworkRecordConnection();
networkRecord.ConnectionId = '04P1J000000fwAp'; // Connection org Id.
networkRecord.LocalRecordId = ''; // Account record Id.
networkRecord.RelatedRecords = 'Test_Object__c'; // Related record object API

Now, I have a checked that when I shared an account record, Test Object record is not shared. I don't find any issue. Can anyone help me with this?

I have configured that "Test Object" in connection from both org for Publish and Subscribe. Also, I have accepted auto accept record configuration.

When I share account record I found that account record sharing information in "PartnerNetworkRecordConnection" object but, I did not find Test Object record in that object.

I don't understand why newly created object records are not shared with Account record.

Thanks, in advance :)

3

0

You must log in to answer this question.

Browse other questions tagged .