• Live group demo of Marketing Hub + Data Agent

    Standardize reporting, reduce manual work, and introduce AI without cleanup

    Join us on March 12
  • Ready to build your local HubSpot community?

    HUG leaders host events, spark connections, and create spaces where people learn and grow together.

    Become a HUG Leader

Custom code error

rulpats
Contributor

I get a custom code error whenever a sync between Hubspot and SF occurs. 


Could you explain why this happens and what exactly needs to be done by the SFDC admin team to resolve this? 

To be specific I could drill down the reason as follows. 

 

 

EngagementScore_LeadTrigger: execution of AfterUpdate

caused by: System.DmlException: Update failed. First exception on row 0 with id 0011N00001F9SDZQA3; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 12 records: 0011N00001F9SDZQA3,0011N00001F9SDfQAN,0011N00001VlXXdQAN,0011N00001WDuwyQAD,0011N00001ids0LQAQ,0011N00001jrcS6QAI,0013l000022suneAAA,0013l000022suppAAA,0013l000022susPAAQ,0013l000022suuaAAA, ... (2 more): []

Trigger.EngagementScore_LeadTrigger: line 91, column 1

0 Upvotes
2 Replies 2
rulpats
Contributor

@PamCotton My colleague says that there is an apex class which is a part of hubspot integration in SFDC, and its not editable.

0 Upvotes
PamCotton
HubSpot Alumni
HubSpot Alumni

Hello @rulpats, thank you for posting in our Community!

 

The error you are seeing is a custom code error, which means that there is some automation or a validation rule in Salesforce that is preventing records from syncing. I don't have any visibility into your Salesforce settings, so I am not able to determine exactly which one it is on my end.


 

What I can determine is that the UNABLE_TO_LOCK_ROW error you are seeing often appears when we see a record updating by another Salesforce user while HubSpot is trying to update it at the same time.


 

The next steps you can take are to reach out to your Salesforce admin to check the automation and validation rules you have set up within Salesforce.

 

I hope this information helps,

 

Pam

0 Upvotes