0

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.

  • Big blocks of text are hard to read. I've attempted to break it up into logical segments (and fixed some spelling/grammar issues) to make it easier for others to parse. That said, I'm not really sure if you've provided enough detail for others to be able to help narrow down your issue. – Derek F Jul 24 at 17:24
  • I could add my trigger code and give an explanation of all the PBs if someone asks – user3688231 Jul 24 at 17:48
  • (1) best practice is one PB per sobject; (2) if this error is reproducible, start by deactivating PBs until you can no longer reproduce; (3) debug log can help – cropredy Jul 25 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.