Skip to main content

Hi Everyone,

I have created a scheduled trigger flow. The flow needs to send email alerts and create events for those related contacts.The flow is working fine, when have 50 contact records.

But when i have more than 2000 contact records where I am getting the error in the flow . The Error is too many SOQL Queries.

Can any one assist me with the issue please.

#Scheduled Flow
4 answers
  1. Jan 19, 2024, 6:11 PM

    Hi Harsha,

     

    Not sure if it helps. But it seems that your Flow is exceeding the (strict) governor limits enforced on the number of SOQL queries (100).

     

    You might need to do away with the Loops and maybe set a condition to reduce the number of possible queries, such that only events and alerts are triggered for the relevant related contacts.

     

    Here are possible reading material for you to learn more.

     

    1. https://help.salesforce.com/s/articleView?id=000386220&type=1

    2. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_bestpract.htm

     

    Cheers,

    Jay

0/9000