Example of poorly written apex trigger code #dontwritelikethisplease
Mistakes: 1. SOQL Queries within FOR LOOP
2. DML within FOR LOP
3. All the Code Logic within the trigger is no good (No flow control and NO Separation of Concern)
Look into Apex Recipes and learn patterns and best practices:
https://github.com/trailheadapps/apex-recipes
Remark: You are making Admins' life not easier by not making your triggers bulk safe.
In other words, you are potentially preventing data loads into Salesforce.
Orignal Source: https://twitter.com/msrivastav13/status/1450155721669156869
For more Join bit.ly/salesforcegeeks
Mistakes: 1. SOQL Queries within FOR LOOP
2. DML within FOR LOP
3. All the Code Logic within the trigger is no good (No flow control and NO Separation of Concern)
Look into Apex Recipes and learn patterns and best practices:
https://github.com/trailheadapps/apex-recipes
Remark: You are making Admins' life not easier by not making your triggers bulk safe.
In other words, you are potentially preventing data loads into Salesforce.
Orignal Source: https://twitter.com/msrivastav13/status/1450155721669156869
For more Join bit.ly/salesforcegeeks