ApexBeginnerbulkificationtriggersbest-practices
What is bulkification in Apex?
Real World Scenario
A data load updates 200 Accounts and a trigger fails. You explain why bulk-safe code matters.
Expected Answer
• Salesforce processes up to 200 records per trigger batch in one transaction
• Bulkification means writing code that handles lists of records, not assuming one record
• Never run SOQL or DML inside a loop over trigger records
• Collect IDs, query once, process in maps, then DML once
• Bulk-safe triggers prevent governor limit errors during imports and mass updates
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Too many SOQL queries (101) or too many DML rows/statements. The entire transaction rolls back.
Architect Perspective
If you remember one Apex rule: no SOQL/DML in loops. Interviewers literally listen for that phrase.