What are the most important points to be considered while bulkifying a trigger ?



What are the most important points to be considered while bulkifying a trigger ?..

Answer / Ajay Kumar Baitha

1. Process as many records as possible in a single transaction (DML operation) to reduce the number of calls made to Salesforce. 2. Use collections like List, Map, and Set instead of loops for iterating through records. 3. Make sure to use 'Database.Update' or 'Database.Upsert' methods for DML operations in bulk. 4. Limit the number of queries, future calls, and calls to external services.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

Can you use group by clause inside inner query in soql? Like select id, name,(select count(id),name from contacts group by name having count(id) > 1 )

1 Answers  


Can a standard object become child in master detail relationship? : salesforce objects & fields

1 Answers  


What are the actions available in workflow?

1 Answers  


What is minimum test coverage required for trigger to deploy? : salesforce crm

1 Answers  


What is organization wide default? : salesforce sharing and security

1 Answers  


What are web services? Why we need to go for them? What is wsdl?

1 Answers  


Explain the static methods and variables in salesforce?

1 Answers  


What is $resource global value provider? Is it possible to obtain a reference to a static resource in javascript code?

1 Answers  


How can we set-up recurring time-based workflow actions in the platform ?

1 Answers  


What are the different types of salesforce objects?

1 Answers  


Is there any issue with joined report?

1 Answers  


When do we need to use javascript remoting and how is it implemented ?

1 Answers  


Categories