function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Smallkid14Smallkid14 

Unable to delete Action Plan

I am trying to delete an Action Plan from an account record.  Here is the error that I get:

 

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Apex trigger ActionPlanTrigger caused an unexpected exception, contact your administrator: ActionPlanTrigger: execution of BeforeDelete caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Trigger.ActionPlanTrigger: line 18, column 1". 

 

Any help on this would be appreciated!  Thanks, in advance!

 

Steve

K.G.K.G.

Hi @Smallkid14,

I don't have an answer, but I wanted to make it known (in case the authors of Action Plans ever stop by) that I ran into a similar problem.

Despite no changes to our processes, workflows, or triggers, between last week and this week two of the tests in this package's test suite started failing with the same kind of error.  (These tests involve deleting "ActionPlan" items.)  Unfortunately, I haven't yet found much info about WHAT exactly is supposedly a 100,000-row table (to my knowledge, nothing in our org!) or how to make this problem go away or what made it suddenly appear.