I have a process builder that is failing due to the following error:
The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: LPP_ServiceAppointmentTrigger: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 0WO1C0000009; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record:  ()
Basically what this PB does is that when the Assigned Resource object changes or gets created, it takes the Photographer name from it and updates the Name in the service appointment object.
There is also this trigger on the service appointment object which creates and updates information on Work order.
I also noticed we have a PB on Opportunity that's updating a field on Service appointment and work order objects and 2 PB on Service Appointment object. So I know that this error is probably happening because multiple processes might be working on the same record.
My question is how do I fix this issue and, most importantly, how do I debug this so that I can isolate which trigger/PB is exactly causing this issue?
I am not very good with Process Builders, and they are causing a lot of errors in my org. If need be I can attach the service appointment trigger and go over what each PB is doing.