You need to sign in to do that
Don't have an account?
Sharath-learner
System.limitException Too many SOQL queries
Integer repeat=4;
while(repeat!=0)
{
if(repeat==0)
{
break;
}
else
{
Integer nextCount =[select COUNT() from Account where Batch_Queue__c = true];
if(nextCount!=0)
{
sendNotification('Account');
}
}
repeat--;
}
and send Notification contains only 4 SOQL queries not with in for loops.
But i'm getting this exception...
Please help
you are calling a method sendNotification('Account'), might be in this method you are exceuting soql queries.
Can you paste the sendNotification('Account') method?
provide the code of sendNotification('Account') method and also it looks like you are using trigger to execute above code.
Please confirm.
Regards,
Kamlesh Chauhan, (Founder & CTO, LogicRain Technologies)
kamlesh@logicrain.com || http://www.logicrain.com || LinkedIn
Answers/Suggestions are my own.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.