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

System.QueryException: Non-Selective against large Oject type 10000K Records
System.QueryException: Non-Selective against large Oject type
This in a Before Update Trigger: on Opportunity
The Marketplace_Partner_Key__c is a field on the Account Object and the Opportunity. This field is passed from an external source who omitted the Account.Id. Therefore what I am trying to do is get to the the Account Object
using the Marketplace_Partner_Key__c on the Opportunity. This is not an indexed field so I'm trying to load only those Account Records where the Marketplace_Partner_Key__c is not null.
Here is the code that raises the error message:
Set<Id> idSet = New Set<Id>();
For (account tmp : [Select Id, Name, Marketplace_Partner_Key__c
From account Where Marketplace_Partner_Key__c != Null
Order by Marketplace_Partner_Key__c]) {
if (tmp.Marketplace_Partner_Key__C != Null) {
idset.add(tmp.Marketplace_Partner_Key__c);
}
}
Thanks for any help
This in a Before Update Trigger: on Opportunity
The Marketplace_Partner_Key__c is a field on the Account Object and the Opportunity. This field is passed from an external source who omitted the Account.Id. Therefore what I am trying to do is get to the the Account Object
using the Marketplace_Partner_Key__c on the Opportunity. This is not an indexed field so I'm trying to load only those Account Records where the Marketplace_Partner_Key__c is not null.
Here is the code that raises the error message:
Set<Id> idSet = New Set<Id>();
For (account tmp : [Select Id, Name, Marketplace_Partner_Key__c
From account Where Marketplace_Partner_Key__c != Null
Order by Marketplace_Partner_Key__c]) {
if (tmp.Marketplace_Partner_Key__C != Null) {
idset.add(tmp.Marketplace_Partner_Key__c);
}
}
Thanks for any help