Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOQL Datatable - Multi-line inline edit causing UNABLE_TO_LOCK_ROW #107

Open
jmanueljohnson opened this issue Aug 2, 2021 · 1 comment

Comments

@jmanueljohnson
Copy link

Using the soqlDatatable to mass edit a set of child records with a common parent can cause an UNABLE_TO_LOCK_ROW error especially when there is any automation triggered by the update of the parent record. Seems like the issue could be that the multi-line edit uses updateRecord and processes each edit in a separate transaction instead of in a batch.

@tsalb
Copy link
Owner

tsalb commented Aug 6, 2021

Ah this is a very fair point on the potentially unoptimized design. I’ve leaned pretty hard into “following platform” (I.e use LDS even for ILE since that was straight in the docs).

IMO, if the datatable docs uses LDS for updating one would assume they would take care of concerns like chunking.

The other solve would be to create a fork in the update DML (thus, a configurable option somewhere) to use LDS vs Apex.

For now, keeping this open for visibility but no action yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants