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

How can this line of code give me a query limit exception?
List<Task> histories = [Select id,Ownerid,whatid,whoid,activitydate,subject,website__c From Task where (whatid=:relatedLink.id and Ownerid=:currentUser and Status='Not Started') limit 1];
I'm getting an exception when deploying that is telling me "Too many query rows: 501".
Doesn't the "Limit 1" take care of this??
Thanks!
Governor limits are per transaction. So, you must have already brought back 500 rows from another query or queries.
All Answers
Governor limits are per transaction. So, you must have already brought back 500 rows from another query or queries.
Of course, thank you. That did it. Had another query with a limit 500 so this one put it over the edge. Thanks!