You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional Info
I think the exception is thrown in ActionPlansBuilderUtilities class in the line 190: for (Task tmpTask : [SELECT Id, TaskAPTask__c, Subject FROM Task WHERE TaskAPTask__c IN :mapAP.keySet()]) {. When mapAP contains null as a key, the number of Tasks returned by query exceeds 50000, and the exception is thrown. You should update the WHERE part of your query to exclude Tasks with empty TaskAPTask__c field.
The text was updated successfully, but these errors were encountered:
Thank you, @marcin-zabadaj - this will be updated in the next released version. We will change that map to a set that is populated after the upsert, so we are sure that only populated records are queried... but will still specify the value is not null, just in case. This is being done in branch release/4.2.0.
Describe the bug
When I edit Action Plan, add a new Task, and save, the "LabsActionPlans: Too many query rows: 50001" exception is thrown.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Action Plan should be saved without any errors.
Screenshots
![image](https://user-images.githubusercontent.com/91684099/164420922-a7649f7d-a123-42ab-9e69-c0bd3fceb55d.png)
Log File
log.txt
Additional Info
I think the exception is thrown in ActionPlansBuilderUtilities class in the line 190:
for (Task tmpTask : [SELECT Id, TaskAPTask__c, Subject FROM Task WHERE TaskAPTask__c IN :mapAP.keySet()]) {
. WhenmapAP
contains null as a key, the number of Tasks returned by query exceeds 50000, and the exception is thrown. You should update theWHERE
part of your query to exclude Tasks with emptyTaskAPTask__c
field.The text was updated successfully, but these errors were encountered: