You need to sign in to do that
Don't have an account?
Salesforce to Salesforce
Hi all,
Im using the following code to send over an account and its related opportunity:
List<PartnerNetworkRecordConnection> accountConnections = new List<PartnerNetworkRecordConnection>();
for (Account newAccount : localAccount)
{
PartnerNetworkRecordConnection newConnection =
new PartnerNetworkRecordConnection
(
ConnectionId = networkId,
LocalRecordId = newAccount.Id,
RelatedRecords = 'Opportunity',
SendClosedTasks = true,
SendOpenTasks = true,
SendEmails = true,
//ParentRecordId = newContact.AccountId
ParentRecordId = null
);
accountConnections.add(newConnection);
}
database.insert(accountConnections);
this works fine if the owner of the account is the owner of the opportunity, but if the owners are different i get an error:
salesforce INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
has anyone any idea why? im stumped.
Thanks
Hello,
Try to give the profile of the second user the "Modify All" permission. That should take care of your error.
Thanks,
Adrian