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
santhoshreddy vanchasanthoshreddy vancha 

how to avid 151 dml exception ?

Geoffrey BessereauGeoffrey Bessereau
You're probably doing an update or a creation inside of a loop.
Store all records to be created in a colleciton variable and create them all at the end.