• Fredrik Burlin
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Senior Developer


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi,

i get an UNABLE_TO_LOCK_ROW  error when running my tests in parallel. The error occurs when creating a pricebookentry in the standard pricebook. As far as i know Salesforce locks also the parent Object when inserting a object. Which would mean that in this case while inserting the pricebookentry the pricebook is locked. When now a parallel test wants to add another entry to the locked pricebook the test throws the UNABLE_TO_LOCK_ROW error.

Does anyone know how to get around this?