Questions tagged [queryexception]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
0answers
23 views

System.QueryException: sObject type 'PushTopic' is not supported

As part of our managed package we have a post-install script that inserts push topics to support the integration between our solution and SF. Before today this post install script worked fine. I was ...
0
votes
1answer
60 views

Batch Apex System.LimitException: Too many query locator rows: 50000001

There is a object(assume A) which will store event logs for a custom object(assume B). A batch job, runs weekly on object A to delete the records based on some conditions. It throws an exception like ...
0
votes
1answer
61 views

System.QueryException: Inline query has too many rows for direct assignment, use FOR loop [duplicate]

I have a batch executed : 1 out 4200 is failing with : inline query has too many rows for direct assignment,use FOR loop My code in the exec function: List<String> personAccountsIDs = ...
1
vote
1answer
89 views

System.QueryException: Implementation restriction: ContentDocumentLink requires a filter by a single… in test class?

I'm facing System.QueryException: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's ...
0
votes
0answers
42 views

System.ListException: List index out of bounds: 0 in test class when we try to query ProcessInstanceWorkitem [duplicate]

I am getting List index out of bounds exception when I try to query ProcessInstanceWorkitem in test class. Below is the code snippet in the main class: ProcessInstanceWorkitem[] piw = [SELECT Id ...
0
votes
1answer
103 views

How to test Exceptions (Query and DML) for ContentDocument?

I try to write wrong query, but I get just error un my test, not coverage. If I use try-catch in unit-test - no error and no coverage either. How to test it right? And how can I test here delete DML ...
1
vote
1answer
714 views

System.QueryException: sObject type 'OpportunityLineItem' is not supported

We get this script exception (in managed package) emailed from a customer instance. Apex script unhandled trigger exception by user/organization: XXXXX/YYYYY pkg1.ProductOppStockCheck: ...
3
votes
2answers
170 views

Non-selective query against large object type (more than 200000 rows)

I have a Set called set_pvCorporativo with about 600 values. I want to bring exactly 600 accounts that have the pv_Corporativo value in set_pvCorporativo AND the Status 'Ativo' in a query like: List&...
1
vote
1answer
34 views

Is this a selective SOQL?

Select Id, Field1_Id__c, Field2__c from CustomObject__c where Field1_Id__c =: STRING_CHARACTER_BLANK AND Field2__c IN: setOfIds Getting the following error when a query as above is executed from a ...
-1
votes
1answer
79 views

How to insert images/flags on visualforce page to show the outcome of exceptions and invalid field values [closed]

I have a requirement in which I have to show flags/images in VF page in case of any exceptions ... For Eg. If for a field say Receipt__c = true but if the attachments is not added by user for that ...
0
votes
1answer
107 views

Lead APEX Trigger (Non-selective query against large object type (more than 200000 rows))

I want to write a trigger that creates a 6 digit code and checks if the code is unique. First of all my trigger: trigger LeadIdentCodeTrigger on Lead (before insert, before update) { for(Lead ...
0
votes
1answer
213 views

custom relationship name salesforce

I want to make a custom relation between Opportunity and Account. I want to retrieve the account who makes the opportunity So I wrote this: "SELECT Id, RecordType.Name, Name, Description, ...
-3
votes
1answer
248 views

How to run SOQL for an Object having more than 200K records?

I’m trying to populate a custom lookup field called Part Name( API Name: Part_Number__c) on Case Object, where Part Name field is a lookup to Product Object( Maps to Product Name). We’ve 3 Picklist ...
0
votes
1answer
249 views

Test for QueryException

I have some code wich I need test and there I have some problem try { Contact checkContact = [SELECT Id, FirstName, LastName, Email FROM Contact WHERE Email = :email]; } catch (...
1
vote
1answer
121 views

Query ApexEmailNotification in APEX

I am trying to query for ApexEmailNotification in APEX, but am not able to. I am getting this error message System.QueryException: sObject type 'ApexEmailNotification' is not supported. The use ...
0
votes
1answer
126 views

System.QueryException: List has no rows for assignment to SObject for Object created in test case

Can someone help me to understand why I am getting below error message? It is referring to the lines with DocumentQUoteEmailController and List<contact>. It seems that I already entered these ...
3
votes
2answers
393 views

Inconsistency with error “Aggregate query has too many rows for direct assignment”

I have a Box__c record with 100 Doors__r, 104 Motors__r, and 0 Wheels__r. ISSUE #1 I am getting the error System.QueryException: Aggregate query has too many rows for direct assignment, use FOR ...
0
votes
1answer
51 views

Query String with concat from a different method

I'm trying to query to run a Batch but the problem is that Im getting errors with the query string public with sharing class ApiLogsPurgeJob implements Database.Batchable<sObject>, Database....
0
votes
1answer
217 views

System.QueryException: Non-selective query against large object type (more than 200000 rows)

I have created an app that would change CampaignMemeber Status Values by calling our web application api and storing info in custom objects. In my developer org where the package is created works fine ...
1
vote
2answers
296 views

Non-selective query against large object type error even on an indexed field

I have the dreaded Non-Selective query error but I am not sure why. I am on the Lead object and querying against 3 fields which are indexed so I am not sure why I am getting this error. I do have over ...
5
votes
1answer
3k views

Inline query has too many rows for direct assignment, use FOR loop

I am receiving an error stated above on line 26**(listAccount1)**, can anyone guide me on how to solve it? public class FRB_UpdateExceptionsforBatch { public static void FRB_Exceptions(){ ...
1
vote
2answers
4k views

SOQL query is not working in Test class coverage

I wrote three soql queries in test class static testMethod void test_DoGet() { RestRequest req = new RestRequest(); RestResponse res = new RestResponse(); ...
0
votes
1answer
117 views

List has no rows for assignment to SObject Customer Portal - Communities

I need your help to understand what's happening here. We are using the Customer Portal (Community) for quite a long time, we use 'Customer Community Login User' profiles that we assign to external ...
-2
votes
1answer
47 views

Test class code coverage?

I got this error when trying to execute apex test class. System.QueryException: List has no rows for assignment to SObject line no:60&line no:82 This my code @isTest private class ...
0
votes
1answer
77 views

Contact Record - System.QueryException: List has no rows for assignment to SObject

Task a=new Task(); a.whatid=Acc.id; a.Status='Communication Sent'; a.Action__c='Auto Execute'; a.Adhoc_Communication__c=True; a.Email_Address__c='henry@gamil.com'; a.Encrypted_Reference_Number__c= ...