QuestionQ24

VerifiedData Governance

Universal Containers (UC) has a complex Salesforce org with many Apex classes, triggers, and automated processes that can modify records when available. UC has identified that, in its current development state, it risks encountering race conditions on the same record.

What should a data architect recommend to ensure records are not updated simultaneously?

Explanation

Apex FOR UPDATE in a SOQL query locks the selected sObject records for the transaction, preventing concurrent transactions from updating the same records and thereby avoiding race conditions and thread-safety issues.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!