function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

what is a transaction and how to process 1000 records for any DML operation in one transaction?


"An Apex transaction represents a set of operations that are executed as a single unit. All DML operations in a transaction either complete successfully, or if an error occurs in one operation, the entire transaction is rolled back and no data is committed to the database. The boundary of a transaction can be a trigger, a class method, an anonymous block of code, a Visualforce page, or a custom Web service method."

Please read this link, it will help.

In order to bulkify your code and process mutiple records in one transaction you should use apex collections E.g Maps, Set, List


Fahad Akhtar