You need to sign in to do that
Don't have an account?
Mythili
@ReadOnly thorwing System.LimitException: Too many query rows: 50001 error
I have nearly 300,000 account records in my org. I have the following class in my org:
global class testReadOnly{
@ReadOnly webservice static List getAcc()
{ return([select id from Account]); }
}
When I tried calling this method like testReadOnly.getAcc(); I get the following error:EXCEPTION: System.LimitException: Too many query rows: 50001
Documentation says @ReadOnly returns upto 1 million rows. Please note that I have not performed any DML, sent emails or anything else in this transaction.
Can anyone tell me why am I getting the error even though I use @ReadOnly annotation. Thanks.
global class testReadOnly{
@ReadOnly webservice static List getAcc()
{ return([select id from Account]); }
}
When I tried calling this method like testReadOnly.getAcc(); I get the following error:EXCEPTION: System.LimitException: Too many query rows: 50001
Documentation says @ReadOnly returns upto 1 million rows. Please note that I have not performed any DML, sent emails or anything else in this transaction.
Can anyone tell me why am I getting the error even though I use @ReadOnly annotation. Thanks.
Hope you are not violating the above highlighted part?
If yes, the your top level call is not a webservice call.
Do mark my answer as best answer if it helped solve your problem
You can refer the debug logs and see, it says Type = API