function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

SOQL Governer Limit with Trigger

In my Organization there are totally 4 triggers on Opportunity and 4 triggers on Account. Each trigger fires 2 or 3 SOQL statements. None of the triggers have SOQL statements inside For or If loop.


When i create a Opportunity, it fires all these 8 triggers and thus hitting Governer Limits.


Any suggestions on How to proceed from here?

If you are accessing the same or similar data, I would suggest making some singleton methods to create maps. I had this issue too and using maps solved it.


If you are not familiar:


Map Info:


Singleton Info:


I made one Apex class to hold these singleton methods so I could call them from my triggers.




In Spring 11 (rolling out in February), there are no separate set of governor limits for the trigger context. You will be able to make upto 100 SOQL calls (even in a trigger context) starting in Spring 11. I would just wait for that release and not modify any existing code.