Q:

SF2SF trigger sharing not working

I'm trying to share with a Connection new Accounts. I used the trigger examples to create the following trigger:
trigger SendAccountsToConnection on Account (after insert) {
        PartnerNetworkConnection conn = [select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection  where ConnectionStatus = 'Accepted' and ConnectionName = 'Connection Name'];
        List<PartnerNetworkRecordConnection> recordConnectionToInsert  = new List<PartnerNetworkRecordConnection>  ();
        for (Account acc : Trigger.new){
            PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection();

            newrecord.ConnectionId = conn.Id;
            newrecord.LocalRecordId = acc.id;  
            newrecord.SendClosedTasks = false;
            newrecord.SendOpenTasks = false;
            newrecord.SendEmails = false;
            recordConnectionToInsert.add(newrecord);
        }
        if (recordConnectionToInsert.size() > 0){
            System.debug('>>> Sharing ' + recordConnectionToInsert.size() + ' records');
            insert recordConnectionToInsert;
        }
}

Based on the debug log, the record is inserted. But when I look for it, it show with "Status"="Invite", which I can't find in the documentation (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_partnernetworkrecordconnection.htm) and the Account doesn't show in target org.

A:

Here status invite means the record you have just shared is not created in organization and require other organization owner to accept the record. When you create record by this, an invitation email is sent to connection owner with a link to records you are inserting/updating to organization. On that link connection owner accept or decline the record creation. Until the connection owner doesn't accept the change, the record will not insert in target organization.

A:

The problem in this case was that the target org didn't have enough space to create the records. Freeing up space in the target org solved the problem.

