You need to sign in to do that
Don't have an account?
nick8
I am getting System.QueryException: Non-selective query against large object type" this error
Set<Id> OTCorpids = new Set<Id>();
for(Order_Transaction__c OTlist : ots){
OTCorpids.add(OTlist.Corp_Account__c);
system.debug('OTCorpids***** '+OTCorpids);
}
Map<Id, List<Account>> corptogrpacctsmap = new Map<Id,List<Account>>();
for(Account grpacct : [SELECT Id,Parentid,RecordTypeId FROM Account WHERE Parentid IN: OTCorpids AND Status__c = 'Active' order by recordtypeId]){// this is the line i am getting the error.
I am not sure why
Thanks
for(Order_Transaction__c OTlist : ots){
OTCorpids.add(OTlist.Corp_Account__c);
system.debug('OTCorpids***** '+OTCorpids);
}
Map<Id, List<Account>> corptogrpacctsmap = new Map<Id,List<Account>>();
for(Account grpacct : [SELECT Id,Parentid,RecordTypeId FROM Account WHERE Parentid IN: OTCorpids AND Status__c = 'Active' order by recordtypeId]){// this is the line i am getting the error.
I am not sure why
Thanks
Hope this may help you
https://help.salesforce.com/articleView?id=000002493&language=en_US&type=1
Please mark as best answer if the above helps ...!!
Please check below post
1) https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_VLSQ.htm