I have established a connection between two salesforce org using S2S - <https://developer.salesforce.com/page/An_Introduction_to_Salesforce_to_Salesforce>

I am trying to use a programatic approach to share the records between the two org. I am running the below code in execute anonymous of the source org to share
a record of an object named Asset\_\_c. THis is just to test the connect whether the records get updated in the target org automatically.

```
Asset__c a = [select id from Asset__c where id='a0046000001iciD'];

PartnerNetworkConnection network = [select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection
where ConnectionStatus = 'Accepted'];

PartnerNetworkRecordConnection newConnection =
                    new PartnerNetworkRecordConnection(
                        ConnectionId = network.Id,
                        LocalRecordId = a.id,
                        SendClosedTasks = false,
                        SendOpenTasks = false,
                        SendEmails = false);
upsert newConnection;

```

But my above code makes no change to the record in the target org. Am I missing something here or is it not the right way to execute the code?

Any suggestions?