Development questions

How do Governor Limits impact Apex Triggers (specifically the 100 SOQL and 150 DML limits)?

DevelopmentMediumTCSWiproInfosysCognizant

Governor limits apply per transaction, and all triggers, flows and classes firing in that transaction share them. Key synchronous limits: 100 SOQL queries, 150 DML statements, 50,000 query rows, 10,000 DML rows, 10 s CPU, 6 MB heap.

SOQL/DML inside a loop in a trigger exhausts 100/150 quickly when 200 records are processed, causing an uncatchable LimitException. Bulkify, use Maps and Sets, and keep other automations on the object in mind, since they consume the same budget. Check usage with the Limits class.

apex-triggertriggergovernor-limits