Questions tagged [queryexception]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
40 views

Developer script exception: Do not have access to view running user

I'm trying to debug a "Developer Script Exception". Apex script unhandled trigger exception by user/organization: 0053000000ARXXX/00D30000000XXX AccountMasterTrigger: execution of ...
0
votes
1answer
36 views

How do I check if a list-value from my Map is empty?

I get this error in case if Opportunity__c has no OpportunityInfo__c. I try to check it with the condition if(opportunitiesMap.get(actualTool.Rent__r.Opportunity__c).OpportunityInfo__r != null), but ...
0
votes
1answer
37 views

How to write Expressions in SOQL Query

I have a custom object Professor Professor { Name(Text) , Salary(Number) , Bonus(Number)} I wrote the query in Developer console select Name from Professor__c where (salary__c + bonus__c) > 7 ...
0
votes
1answer
276 views

Date format in SQL query

We need a specific format date to personalize our emails, for example, the US date format is MM/DD/YYYY HH:MM:SS and we need to display DD/MM/YYYY. Is it possible to change the date format directly ...
5
votes
0answers
110 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
113 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
110 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
272 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
46 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
198 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
1k 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: ...
4
votes
2answers
451 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
39 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
100 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
126 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
293 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
305 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
387 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
181 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
136 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
492 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
57 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
240 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
369 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
4k 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
6k 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
176 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
48 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
80 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= ...