UNABLE_TO_LOCK_ROW error during inserting a new Record [duplicate]
This question already has an answer here:
Can anybody explain the UNABLE_TO_LOCK_ROW error?
1 answer
I am trying to insert new records in Salesforce using data loader, but getting the below error -
Error received from salesforce.com. Fields . Status code [UNABLE_TO_LOCK_ROW]. Message [unable to obtain exclusive access to this record].
I thought this happens only during update, but why it is happening in Insert
data access loader
marked as duplicate by Pranay Jaiswal, battery.cord, Raul, glls, Dave Humm Dec 13 '18 at 9:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Can anybody explain the UNABLE_TO_LOCK_ROW error?
1 answer
I am trying to insert new records in Salesforce using data loader, but getting the below error -
Error received from salesforce.com. Fields . Status code [UNABLE_TO_LOCK_ROW]. Message [unable to obtain exclusive access to this record].
I thought this happens only during update, but why it is happening in Insert
data access loader
marked as duplicate by Pranay Jaiswal, battery.cord, Raul, glls, Dave Humm Dec 13 '18 at 9:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Are you inserting child records? If child cannot get access to parent it throws that error.
– Pranay Jaiswal
Dec 11 '18 at 14:22
add a comment |
This question already has an answer here:
Can anybody explain the UNABLE_TO_LOCK_ROW error?
1 answer
I am trying to insert new records in Salesforce using data loader, but getting the below error -
Error received from salesforce.com. Fields . Status code [UNABLE_TO_LOCK_ROW]. Message [unable to obtain exclusive access to this record].
I thought this happens only during update, but why it is happening in Insert
data access loader
This question already has an answer here:
Can anybody explain the UNABLE_TO_LOCK_ROW error?
1 answer
I am trying to insert new records in Salesforce using data loader, but getting the below error -
Error received from salesforce.com. Fields . Status code [UNABLE_TO_LOCK_ROW]. Message [unable to obtain exclusive access to this record].
I thought this happens only during update, but why it is happening in Insert
This question already has an answer here:
Can anybody explain the UNABLE_TO_LOCK_ROW error?
1 answer
data access loader
data access loader
asked Dec 11 '18 at 14:19
Aritra Chakraborty
133
133
marked as duplicate by Pranay Jaiswal, battery.cord, Raul, glls, Dave Humm Dec 13 '18 at 9:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Pranay Jaiswal, battery.cord, Raul, glls, Dave Humm Dec 13 '18 at 9:41
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Are you inserting child records? If child cannot get access to parent it throws that error.
– Pranay Jaiswal
Dec 11 '18 at 14:22
add a comment |
Are you inserting child records? If child cannot get access to parent it throws that error.
– Pranay Jaiswal
Dec 11 '18 at 14:22
Are you inserting child records? If child cannot get access to parent it throws that error.
– Pranay Jaiswal
Dec 11 '18 at 14:22
Are you inserting child records? If child cannot get access to parent it throws that error.
– Pranay Jaiswal
Dec 11 '18 at 14:22
add a comment |
1 Answer
1
active
oldest
votes
There are lots of situations where an insert can cause a record lock against the parent of the inserted record, or even against third records. Inserting Task
, for example, can lock the WhoId
, WhatId
, and AccountId
.
The Record Locking Cheat Sheet is an excellent guide to what facets of your data have the highest likelihood of lock contention.
Fixing this error is generally heuristic - you need to understand the cause of the underlying issue and then apply one or more techniques to minimize the locking risk, but there's no switch you can throw to make it go away.
The two techniques that are often applicable are
- Order your incoming data by parent record Id, to prevent records in different batches from contending for the lock on the parent.
- Ensure that the Data Loader is configured to utilize the Bulk API in Serial mode, rather than Parallel mode.
In many cases (such as when a record has exactly one parent) you won't need to do both, just one or the other. Situations with extreme data skew and records that have more than one parent are more complex, however.
Depending on the situation, it's possible you might have to undertake more drastic interventions, like scheduling a maintenance window to prevent users from themselves seeking to work with affected records, or disabling triggers and other automation on the records you're importing.
Spend some time with the locking cheat-sheet to identify your core issue first, though, and try each of the two points above first before you go that far.
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are lots of situations where an insert can cause a record lock against the parent of the inserted record, or even against third records. Inserting Task
, for example, can lock the WhoId
, WhatId
, and AccountId
.
The Record Locking Cheat Sheet is an excellent guide to what facets of your data have the highest likelihood of lock contention.
Fixing this error is generally heuristic - you need to understand the cause of the underlying issue and then apply one or more techniques to minimize the locking risk, but there's no switch you can throw to make it go away.
The two techniques that are often applicable are
- Order your incoming data by parent record Id, to prevent records in different batches from contending for the lock on the parent.
- Ensure that the Data Loader is configured to utilize the Bulk API in Serial mode, rather than Parallel mode.
In many cases (such as when a record has exactly one parent) you won't need to do both, just one or the other. Situations with extreme data skew and records that have more than one parent are more complex, however.
Depending on the situation, it's possible you might have to undertake more drastic interventions, like scheduling a maintenance window to prevent users from themselves seeking to work with affected records, or disabling triggers and other automation on the records you're importing.
Spend some time with the locking cheat-sheet to identify your core issue first, though, and try each of the two points above first before you go that far.
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
add a comment |
There are lots of situations where an insert can cause a record lock against the parent of the inserted record, or even against third records. Inserting Task
, for example, can lock the WhoId
, WhatId
, and AccountId
.
The Record Locking Cheat Sheet is an excellent guide to what facets of your data have the highest likelihood of lock contention.
Fixing this error is generally heuristic - you need to understand the cause of the underlying issue and then apply one or more techniques to minimize the locking risk, but there's no switch you can throw to make it go away.
The two techniques that are often applicable are
- Order your incoming data by parent record Id, to prevent records in different batches from contending for the lock on the parent.
- Ensure that the Data Loader is configured to utilize the Bulk API in Serial mode, rather than Parallel mode.
In many cases (such as when a record has exactly one parent) you won't need to do both, just one or the other. Situations with extreme data skew and records that have more than one parent are more complex, however.
Depending on the situation, it's possible you might have to undertake more drastic interventions, like scheduling a maintenance window to prevent users from themselves seeking to work with affected records, or disabling triggers and other automation on the records you're importing.
Spend some time with the locking cheat-sheet to identify your core issue first, though, and try each of the two points above first before you go that far.
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
add a comment |
There are lots of situations where an insert can cause a record lock against the parent of the inserted record, or even against third records. Inserting Task
, for example, can lock the WhoId
, WhatId
, and AccountId
.
The Record Locking Cheat Sheet is an excellent guide to what facets of your data have the highest likelihood of lock contention.
Fixing this error is generally heuristic - you need to understand the cause of the underlying issue and then apply one or more techniques to minimize the locking risk, but there's no switch you can throw to make it go away.
The two techniques that are often applicable are
- Order your incoming data by parent record Id, to prevent records in different batches from contending for the lock on the parent.
- Ensure that the Data Loader is configured to utilize the Bulk API in Serial mode, rather than Parallel mode.
In many cases (such as when a record has exactly one parent) you won't need to do both, just one or the other. Situations with extreme data skew and records that have more than one parent are more complex, however.
Depending on the situation, it's possible you might have to undertake more drastic interventions, like scheduling a maintenance window to prevent users from themselves seeking to work with affected records, or disabling triggers and other automation on the records you're importing.
Spend some time with the locking cheat-sheet to identify your core issue first, though, and try each of the two points above first before you go that far.
There are lots of situations where an insert can cause a record lock against the parent of the inserted record, or even against third records. Inserting Task
, for example, can lock the WhoId
, WhatId
, and AccountId
.
The Record Locking Cheat Sheet is an excellent guide to what facets of your data have the highest likelihood of lock contention.
Fixing this error is generally heuristic - you need to understand the cause of the underlying issue and then apply one or more techniques to minimize the locking risk, but there's no switch you can throw to make it go away.
The two techniques that are often applicable are
- Order your incoming data by parent record Id, to prevent records in different batches from contending for the lock on the parent.
- Ensure that the Data Loader is configured to utilize the Bulk API in Serial mode, rather than Parallel mode.
In many cases (such as when a record has exactly one parent) you won't need to do both, just one or the other. Situations with extreme data skew and records that have more than one parent are more complex, however.
Depending on the situation, it's possible you might have to undertake more drastic interventions, like scheduling a maintenance window to prevent users from themselves seeking to work with affected records, or disabling triggers and other automation on the records you're importing.
Spend some time with the locking cheat-sheet to identify your core issue first, though, and try each of the two points above first before you go that far.
edited Dec 11 '18 at 14:33
answered Dec 11 '18 at 14:24
David Reed
30.6k61746
30.6k61746
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
add a comment |
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
bookmarking that cheat sheet posthaste
– Derek F
Dec 11 '18 at 14:31
add a comment |
Are you inserting child records? If child cannot get access to parent it throws that error.
– Pranay Jaiswal
Dec 11 '18 at 14:22