Salesforce Decode
Salesforcedecode
Apex questionsQuestion 107 of 179
ApexAdvancedsoqltransactionsconcurrency

Use FOR UPDATE SOQL to prevent lost updates in concurrent Apex

Scenario

Two batch jobs allocate inventory from same Product stock field causing oversell when both read quantity 10 and each decrements by 8.

Answer it out loud first

Serious prep means attempting before reading. Take two minutes to structure your answer, then compare.