You need to sign in to do that
Don't have an account?

Executing triggers for 100000 Records
Hello,
While updating records using data loader, do the triggers execute ?
If not, what are other ways of updating records where i can make sure that the triggers execute.
Thank you for suggestions
While updating records using data loader, do the triggers execute ?
If not, what are other ways of updating records where i can make sure that the triggers execute.
Thank you for suggestions
All Answers
For example, on object i have 6 triggers, do all work correctly ?
Up to 200 records can enter your trigger at once!
Remember Trigger.new? Salesforce will batch up mass updates and include up to 200 records at once in it (this commonly happens when using tools like Data Loader). So for example, if you do one SOQL query per record, you’re going to go over the 100 SOQL query limit!
Triggers are on the same shared Governor Limit!
Got ten triggers that run when an Account is updated? Each trigger does not get its own set of limits! One limit per update, no matter how many triggers are run! This means that if each of your ten triggers runs 12 SOQL queries, you will run a total of 120 SOQL queries and go over the100 SOQL query limit! This means you need to be extra conservative!
You will be tested on bulkification during your job interviews
You can’t have code in a production org that’s not bulkified because your users will get errors! That’s why every job interview specifically tests for this knowledge. The good news is that 90% of people I interview do not understand how to bulkify, so this is your chance to stand out!
1. One Trigger per object
2. Keep SOQL queries outside of loops by leveraging collections (Lists, Sets, Maps)
3. Keep DML outside of loops by leveraging collections (Lists, Sets, Maps) and performing DML on a collection rather than individual records
4. Keep logic outside of the trigger itself. Keep your logic in helper classes that helps in making your code portable and reusable.
while uploading data from data from loader automatically trigger will fire we don't need to write any code for that