Salesforce

How Do I Skip Locked Rows When Updating Multiple Rows (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Skip Locked Rows When Updating Multiple Rows? (Magic xpa 2.x)

You can program a Batch task to continue and not abort, even when encountering a locked row error. There are a number of ways to skip locked rows and handle none-locked rows.

1. Use a Record level transaction.

When the error fires, there is an automatic rollback. Setting the transaction to be on the Record level ensures that only the locked record's transaction is rolled back.

2. Change the Task Error Behavior Strategy to Recover (in the Task Properties dialog box).

This is needed to enable the processing of records after the locked row. A task with an Abort directive, which is the default setting for Batch tasks, will stop when reaching the error.

3. Define a Locked Row error handler with an Ignore directive.

When the error is reached, nothing is done and the task moves on.

Reference
Attachment 
Attachment