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
DarshanaDarshana 

unable to obtain exclusive access to this record while deploying via VSCode

I am facing below error while deploying code (lightning components, apex etc) to org via VSCode
error : 'unable to obtain exclusive access to this record'

I have recently taken VsCode update version 1.46.1, since then I am facing this issue. 
AbhishekAbhishek (Salesforce Developers) 
Hi,

This is because of record locking. From the Salesforce Developer site:

This is something temporary and would be fixed automatically in 10-15 minutes maximum.

Some common causes are:

Sharing Rules are being calculated.
A picklist value has been replaced and replacement is in progress.
A custom index creation/removal is in progress.
Most unlikely one - someone else is already editing the same record that you are trying to access at the same time.

For your reference, you can check the below blog too,

https://support.veeva.com/hc/en-us/articles/115004387833-Error-unable-to-obtain-exclusive-access-to-this-record-or-200-records-When-Running-the-Mass-Assignment-Rules-From-the-Territory-Utilities-in-CRM


I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.
DarshanaDarshana
Hi,

Actually, i tried every possible scenario and read, applied every community answer but none of them worked.
AbhishekAbhishek (Salesforce Developers) 
Then I would suggest you raise a case with the salesforce support team So that our guys will look into it and get back to you.