function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vin BVin B 

Email-to-Case: Error(s) encountered while processing :UNABLE_TO_LOCK_ROW

I have set Email-to -Case in our org. It was working fine earlier, but today I recieved a error mail 
Email-to-Case: Error(s) encountered while processing The following errors were encountered while processing an incoming email: UNABLE_TO_LOCK_ROW : unable to obtain exclusive access to this record or 1 records: 0030a******KazIAAS
Here the record mentioned(0030a******KazIAAS) is a Contact record.Around 12 emials were sent by same contact withing a minute. I have looked in to data skew articles from salesforce.Is the error email occured because the contact(Parent  record) was locked for previous email to case record? Will this error can occur as the number of related cases to this contact increases?We have triggers on case object but we are not updating contact record here. Querying the parent contact record whick is loccked, can cause this issue??Can anyone tell me what exactly is occuring here and what can be the resolution?
Ravi Dutt SharmaRavi Dutt Sharma
A user in your org maybe editing the contact record at the same time, hence the email to case functionality was not able to update that contact and resulted in an error.
SandhyaSandhya (Salesforce Developers)