Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m sad

Email Message insert is getting failed. insufficient access rights on cross-reference id

I am trying to insert Email Message using dbamp
I am getting this error while migrating email message:-
insufficient access rights on cross-reference id: 02s1l000000GPdX
We are not having any such data in our table.
Our data has these columns :-
FromAddress, HtmlBody, RelatedToId, Subject, ToAddress, ref_regardingobjectid_entitytype, OwnerId, CreatedById, LastModifiedById

We have 1 lac 83k data. Out of these 1 lac 30 thousand data is loaded in two days while trying multiple times with smaller batches.
This error is random. Once I get this error when I rerun the script some of the records get inserted and maximum get same error.

I have tried all these to insert the details :

exec SF_BulkOps 'Insert:bulkapi,Serial,batchsize(50)','UAT','EmailMessage'
exec SF_BulkOps 'Insert:bulkapi,Parallel,batchsize(50)','UAT','EmailMessage'
exec SF_BulkOps 'Insert','UAT','EmailMessage'

In all these try I had 90% Failed records and 10% successful inserted.

Please help. Please help fast.
1 person has
this problem
  • The error message is from salesforce. 02s1l000000GPdX is the id of an email message record.

    The salesforce API will sometimes fail the entire batch with the same error message when only 1 record is failing.

    I would take a look on salesforce to see if there is anything about the record that would cause an error. If nothing stands out, I would identify the job id of a job where it failed with that message and then file a case with salesforce asking them to look at that job and help with the error message. Do not send salesforce support any SQL messages; they will not understand. Ask them to focus on the messages in the job.
  • (some HTML allowed)
    How does this make you feel?
    Add Image

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated