Created
May 15, 2021 05:22
-
-
Save rahulmalhotra/5ec0434e1a4ff4c20ce5966cb1f38838 to your computer and use it in GitHub Desktop.
Execute method of batch class used in SFDC Stop UNABLE_TO_LOCK_ROW blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void execute(Database.BatchableContext bc, List<SObject> records) { | |
List<Product_Part__c> productParts = (List<Product_Part__c>) records; | |
for(Product_Part__c productPart : productParts) { | |
productPart.Count__c = 100; | |
} | |
update productParts; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment