DATA-ARCHITECT practice question 5 of 35
Universals Containers’ system administrators have been complaining that they are not able to make changes to its users’ record, including moving them to new territories without getting “unable to lock row” errors. This is causing the system admins to spend hours updating user records every day. What should the data architect do to prevent the error?
Full set: 257 questionsThe "unable to lock row" error during user record updates, especially when changing roles or territories, is a classic symptom of record lock contention caused by sharing rule recalculations. When a user's position in the hierarchy changes, Salesforce must recalculate access for all records they own. If a user owns many records, this process can be lengthy, locking the User object and preventing other updates. Enabling "granular locking" is the specific platform feature designed to resolve this. It allows the system to lock only parts of the internal sharing tables instead of the entire table, significantly reducing contention and allowing concurrent updates to succeed.
A. Reducing concurrent updates is a temporary workaround that reduces the likelihood of the error but does not solve the underlying cause of the long-running lock.
C. Analyzing logs might help identify the problem, but it is a diagnostic step, not a solution. The solution is a specific Salesforce configuration change.
D. Customers cannot directly increase CPU for their Salesforce org. This is managed by Salesforce, and the issue is lock contention, not a lack of processing power.
1. Salesforce Help, "Enable Granular Locking": "To avoid user record locking issues, enable granular locking. When this feature is on, user record updates in different roles aren’t blocked by updates to user records in other parts of the role hierarchy."
2. Salesforce Developer Blog, "Record Locking Cheatsheet": Explains the causes of record locking. "Implicit Locks: Salesforce applies locks to other records that are related to the records you’re updating. For example, updating a user’s role will lock the user’s record..."
3. Salesforce Architects, "Designing Record Access for Enterprise Scale" (White Paper), Page 23: "When you perform updates to the role hierarchy... Salesforce locks a portion of the group maintenance tables to prevent other updates at the same time... you can request that Salesforce enable granular locking on your group maintenance tables."
Keep practicing
Take the free DATA-ARCHITECT practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DATA-ARCHITECT practice questions
- Question 1Which three characteristics of a skinny table help improve report and query performance?
- Question 2Universal Containers (UC) has built a custom application on Salesforce to help track ship…
- Question 3Universal Containers (UC) has lead assignment rules to assign leads to owners. Leads not …
- Question 4Universal Container (UC) has accumulated data over years and has never deleted data from …
- Question 6Universal Containers is experiencing frequent and persistent group membership locking iss…
- Question 7Universal container (UC) would like to build a Human resources application on Salesforce …
