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
sales4cesales4ce 

Governors and Limits

Hi,

 

I have a question in regards with governors and limits:

 

Within a trigger we can have 20 soql queries limit.

 

 assume that we have a scenario where we have a Before trigger and After Trigger on an object. What is the number of SOQL query limits on both the trigger. Do they both share same limit ot 20 or would it be double(40)?.

 

Thanks,

Sales4ce

Best Answer chosen by Admin (Salesforce Developers) 
mtbclimbermtbclimber

No. If the entry point into Apex is a Trigger then across the entire scope of the request you get 20 SOQL queries. Across all befores, afters, etc.