+ Start a Discussion
Gargi ManjeeGargi Manjee 

How to resolve following error: 'Record Currently Unavailable: The record you are attempting to edit, or one of its related records, is currently being modified by another user. Please try again.' ?

Recently we have integrated data sync to Salesforce from another platform using thier API's. While running the data sync we encounter the following issues while inserting few records:

Record Currently Unavailable: The record you are attempting to edit, or one of its related records, is currently being modified by another user. Please try again.

Kindly help with following questions:
1. What are the reasons for this issue
2. Whats design change required to resolved this issue.
Best Answer chosen by Gargi Manjee
Gargi ManjeeGargi Manjee
Hello Everyone,

If your record is Master in Master-Detail relationship and have roll up on child records, accessing master record while updating any child record will give this error.

This is not a very intuitive situation to debug. But figure after scrolling through lot of debug logs.

Just in case anyone looking for this answer.

Regards,

All Answers

AbhishekAbhishek (Salesforce Developers) 
Hi,

This basically happens when there is a conflicting modification being done by other user/process on a particular record that you are trying to access. Mostly it will happen when any kind of batch process is running in the background and locked the particular record you are trying to access(in your case Account). To get rid of this problem, you would need to check if there are any scheduled apex classes running in the background on Accounts/Cases and see if there is anything you can do to optimize the code to avoid conflicting behavior.


For further reference check this,

https://trailblazers.salesforce.com/answers?id=90630000000hYbAAAU


If it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
 
Gargi ManjeeGargi Manjee
Hello Everyone,

If your record is Master in Master-Detail relationship and have roll up on child records, accessing master record while updating any child record will give this error.

This is not a very intuitive situation to debug. But figure after scrolling through lot of debug logs.

Just in case anyone looking for this answer.

Regards,
This was selected as the best answer