Why am I getting this error - unable to obtain exclusive access to this record?
I am getting below error on a custom field on the Account object during deployment.
unable to obtain exclusive access to this record
Why am I getting this error?
You are getting this error - unable to obtain exclusive access to this record 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.
Basically, whatever record it is that you're trying to manipulate is currently in use for the above reasons. Once it's no longer in use, it should become available for you to manipulate.
Without knowing what's in your Change Set however, there is one (painful) option from the Dev Boards:
The solution is to deploy different elements of your package in order until it is all complete. I've compiled a list of the components that I had to deploy, and put them in order. (I printed them up and put them on my desk... )
Any Components that you need to deploy that are not on this list, you can probably figure out how to make it work. If not, get in touch with SF support right away, and they'll get it worked out.
The list:
Deploy objects: Custom, and changes to any others. As well as any custom "help pages" (if any)
Deploy tabs, related documents, Applications
Deploy Triggers, and test Trigger classes
Controllers, test controller classes, components, related classes*
VF pages
Layouts
Email templates
Workflows
Reports
Dashboards
Long story short, if you haven't been waiting and you're still getting this error. You might need to deploy metadata separately.