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
madhumadhu 

insert record by data loader and what the value of boolean static varible in trigger

to avoid recursive trigger i have used static boolean(flag=true)  variable in class. if i insert 4000 records by data loader, for next batch size will the flag will be true or false. will the records get inserted????
SarfarajSarfaraj
Each batch executes in a separate transaction. So the flag will be reinitialized to its initial value. If the initial value is true then for next batch the flag will be true.