You need to sign in to do that
Don't have an account?
Bob 11
Flow Error: This error occurred when the flow tried to update records: Too many SOQL queries: 101
I have a flow that is trying to update records, but users are getting the following error message
This error occurred when the flow tried to update records: Too many SOQL queries: 101
Is there any criteria I can add to the update element to stop this from happening?
This error occurred when the flow tried to update records: Too many SOQL queries: 101
Is there any criteria I can add to the update element to stop this from happening?
This error is because your flow is not bulkified. If your flow has some SOQL in loop then it may cause the issue.
Please find the below article which shows the best pratices while creating flows.
https://succeedwithsalesforce.com/5-best-practices-that-must-be-followed-when-building-flows/
If this solution helps, Please mark it as best answer.
Thanks
A transaction ends as soon as a flow interview begins to wait for an event. When the flow interview resumes, a new transaction begins. Everything after the Wait element is executed as part of a batch transaction that includes other resumed interviews. [...]
Consider using multiple Wait elements so that the DML operations and SOQL queries are performed in multiple transactions.
if your flow is an Auto launched flow, add a pause element and configure it to resume your flow after 0 hours of current date-time.
Please note that pausing the flow makes the rest of the flow run asynchronously in a separate transaction.
Error element Get_Service_Appointment (FlowRecordLookup).
This error occurred when the flow tried to look up records: Too many SOQL queries: 101.
As far as i think, trigger is excuting and this error is coming due to trigger. when you try to update any records from flow at that time trigger is excute. check trigger in your org before and after case.
run below query in query editor and check.
SELECT Id, Name, TableEnumOrId, UsageBeforeUpdate, UsageAfterUpdate FROM ApexTrigger Where TableEnumOrId = 'YourObjectName'
maybe you will find any way.
don't forget to mark it as best answer if it helps you.
Thank you
I ran the query, but i'm not sure what it tells me
In this screenshot I am able to see that you have a one active beforeUpdate trigger on serviceappointment you can deActive it once and than you can run your flow check afterUpdate trigger on same object as well and if that is also active then you do deActive it and then run your flow.
It seem to me that this time it will work fine.
How to deActive trigger
go to your serviceAppointment object and open the trigger tab and open your active trigger => click edit => deActive and then save.
don't forget to mark it as best answer.
thank you