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

error with exception

Apex script unhandled exception by user/organization: 005800000036bA4/00D80000000cSrC

Failed to invoke future method 'public static void updateRelationMethod(LIST<String>)' on class 'updateRelation' for job id '70780000003Dr5C'

caused by: System.DmlException: Update failed. First exception on row 0 with id 0018000000eg4YmAAI; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

Class.updateRelation.updateRelationMethod: line 162, column 1
External entry point

Do anybody know why this error coming up


Depends on what you are doing, but I believe that means you have somehow locked the record and when the future method is called it can't get access.  this might happen due to a master detail relationship or just because you accessed the record.  I ran into it once, but really can't remember exactly what caused it.