You need to sign in to do that
Don't have an account?

bulkify flow trigger or disable during mass update
I'm new to flow trigger. I created a flow trigger that does some updates on user object. This is fired by a workflow when new user is created and updated. This works fine when insert and update is done on single record. I have external program that does a mass updates on user object. I get Too many SOQL's: 101 error on flow when there is mass update.
Is there a way to disable the qwork/flow during mass updates ?
Is there better way ?
Thanks for help.
Is there a way to disable the qwork/flow during mass updates ?
Is there better way ?
Thanks for help.
All the triggers fired will be counted in a single context or call. We need to ensure that total number of SOQL fired should be less than 100.
In order to by pass this, you need to change your code in such a way that SOQL fired must be less than 100 or if you need to change the context then you can use @future annotation which will run the code asynchronously.
You need to make sure that the SOQL query you are using should not be inside the for loop
1. Read this article carefully: http://wiki.developerforce.com/page/Best_Practice%3A_Bulkify_Your_Code
2. Make sure you don't have a recursive loop calling a SOQL.
3. Do not do any DML/CRUD inside a for loop.
4. Use System.Debug() to ensure what you are fetching is what you should be getting.
5. Make use of the Debug logs/Developer console. Debug it, and you will figure it out.
Related Link :-
https://help.salesforce.com/apex/HTViewSolution?urlname=System-LimitException-Too-many-SOQL-queries-101&language=en_US
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
Thanks,
Amit Chaudhary