Loading

CPQ Quote calculation error 'unable to obtain exclusive access to this record or 1 records'

Udgivelsesdato: Sep 27, 2025
Beskrivelse

An asynchronous Quote calculation in Salesforce CPQ is failing with the error message: 

unable to obtain exclusive access to this record or 1 records: <Quote Id>


where <Quote Id> is the Id of the Quote record where the failure occurs.

Løsning
The error message "unable to obtain exclusive access to this record or 1 records:" indicates that a process was attempting to obtain a lock on a record for 10 seconds before eventually quitting the process with an error message indicating that the record is unavailable. If one long-running process or too many short-lived processes are attempting to interact with a record at the same time, this can cause the exclusive access error to occur.

The most common cause of this error message when seen in Salesforce CPQ is when there are multiple calculations on a single Quote queued from a single transaction. These calculations will take approximately the same amount of time to process on the Heroku service. As a result, they will attempt to write back to the Quote record at the same time. This creates the potential for one or more of the processes to be prevented from locking the Quote for an attempted update.

When encountering this error message, admins should examine the following areas to determine if it is possible to reduce any inserts or updates occurring on either the Quote or Quote Line object. Any reductions in updates will result in reduced calculation processes running. Thus, there will be reduced chance of incurring the error message.
  • Custom Apex Classes/Triggers - Any DML statement against a Quote Line will cause a new calculation to be queued. Any DML statement against a Quote in which one of the Calculating fields has been altered will cause a new calculation to be queued. Examine debug logs to determine if there are multiple DML statements against these objects occurring in custom Apex code. Attempt to change logic to use a single DML whenever possible.
  • Workflow Rules, Flows, and Process Builders - Any field Updates against the Quote Calculating Fields or ANY field on the Quote Line will cause a calculation to be queued. Using the "Recursion" setting on Process Builders or the "Re-evaluate Workflow Rules after Field Change" setting on Workflow Rules can also cause extra field updates leading to extra calculations. Due to risk for record locking errors and other Apex limits, it is advised to avoid using Workflow Rules, Flows, and Process Builders on the Quote and Quote Line objects.
  • Non-CPQ Managed Packages - Similar to custom Apex, a non-CPQ managed package may include logic that fires additional DMLs/workflow rules/process builders/etc on CPQ objects causing extra calculations to occur. Analyze debug logs to see where DML statements are occurring. Even if the logs are hidden for the managed package, the DML statements will still be included in the logs.
Vidensartikelnummer

000380651

 
Indlæser
Salesforce Help | Article