I have S2S set up between 2 sandboxes. I'm successfully sharing opportunities between them.

However, I then added notes and attachments to the sync:

newConnection = new PartnerNetworkRecordConnection (ConnectionId = conn.Id,
                                                   LocalRecordId = opp.Id,
                                                   RelatedRecords = 'NoteAndAttachment',
                                                   SendClosedTasks = false,
                                                   SendOpenTasks = false,
                                                   SendEmails = false);

Now in the source sandbox when I modify an opportunity that has a note I get this error: ****System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []****

I presume this has something to do with ownership of the note in the receiving org. However, the opportunity and the note have the same owner in the source org, and S2S has no problem syncing the opp when it has no note attached. So I'm puzzled about why I'm getting this error.

  • the user you are inserting the opp with notes does not have read/create access to notes and attachment object maybe? did you check the user profile?
    – Rao
    Commented Nov 20, 2017 at 18:49
  • The owner is me, and I'm the admin.
    – D Gunn
    Commented Nov 20, 2017 at 22:03


You must log in to answer this question.

Browse other questions tagged .