Questions tagged [queryexception]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
43 views

Lookup query exception while using USER_MODE

I am trying to create a 2GP package. But whenever I try to create a version by running and validating all test classes and metadata, the test class fails and shows such an error. "common.apex....
AJITHKUMAR VP's user avatar
0 votes
0 answers
74 views

How to handle the QueryExceptions(SOQL) effectively in apex class WITH USER_MODE?

I'm trying to do a Query WITH USER_MODE in apex class. I'm Querying an object without the permission in user_mode. I got this error sObject type 'Test__c' is not supported. If you are attempting to ...
Senthil Kumar's user avatar
0 votes
1 answer
114 views

Reproduce UNABLE_TO_LOCK_ROW error in local environment/sandbox

We have external Systems using an rest-endpoint in our Org. In the called function a certain record is called (some kind of tracker) which gets updated everytime the function runs with an success. ...
N4go's user avatar
  • 1
0 votes
1 answer
49 views

execution of BeforeInsert caused by: System.QueryException: List has no rows for assignment to SObject

I have a trigger in place for Opportunity. This trigger is meant to fire when an opportunity reaches the 'VoB Pending' stage. trigger opportunityOwnerAlert on Opportunity (before insert,before update) ...
potato46's user avatar
5 votes
1 answer
154 views

Mysterious "System.QueryException: Truncated" error being thrown in batch job

I am an ISV provider and our managed package is experiencing this error in a batch job in a subscriber org. I cannot find any information on what it means. Oddly, debug logs on this error do not yield ...
Brig Larimer's user avatar
0 votes
2 answers
2k views

Apex Testing Error: System.QueryException: List has no rows for assignment to SObject

I am trying to get my test data set up for an Apex test class I made and I am getting "System.QueryException: List has no rows for assignment to SObject" in the tests error log. Not really ...
Austin Kelly's user avatar
0 votes
0 answers
132 views

List has no rows for assignment to SObject error on null check

Salesforce noob here. I have got an apex trigger that is erroring with "System.QueryException: List has no rows for assignment to SObject" and after researching for quite a bit, I don't ...
chiapa's user avatar
  • 103
1 vote
1 answer
344 views

Allow guest profile to update opportunity line Item

I am trying to setup a web hook to use along side PandaDoc to update opportunity line items once approved but the query on web hook when ran on a guest profile does not return a line item. I can run ...
zachary edgell's user avatar
0 votes
1 answer
405 views

Error:System.QueryException: List has no rows for assignment to SObject

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, UPCustomTrigger: execution of AfterInsert caused by: System.QueryException: List has no ...
Santhiya's user avatar
-1 votes
2 answers
725 views

System.QueryException: Implementation restriction: ContentDocumentLink?

I have been following this to create a lightning component for lighting:file upload. As you can see there's comments on how to avoid the System.QueryException yet I still am getting it? picture of ...
sfn00b's user avatar
  • 77
2 votes
3 answers
2k views

Is it possible to cause an exception on a SOQL select statement?

I'm working on writing tests for someone else's code and they have an try/catch around a SELECT statement. Is it possible to ever get an exception in something like the below code block as long as it ...
aaron's user avatar
  • 855
1 vote
1 answer
1k 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 ...
NSjonas's user avatar
  • 10k
0 votes
1 answer
2k 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 ...
Yagami Raito's user avatar
0 votes
1 answer
431 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 ...
Dinesh Kumar's user avatar
5 votes
0 answers
755 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 ...
Kevin's user avatar
  • 305
0 votes
1 answer
463 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 ...
Lokesh's user avatar
  • 165
0 votes
1 answer
418 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 = ...
Zame's user avatar
  • 125
1 vote
1 answer
3k 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 ...
uma451's user avatar
  • 799
0 votes
1 answer
1k 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 ...
MichaelLev19's user avatar
1 vote
1 answer
5k 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: ...
Pasan Eeriyagama's user avatar
4 votes
2 answers
2k 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&...
Bruno Perdigão's user avatar
1 vote
1 answer
57 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 ...
nverm's user avatar
  • 179
-1 votes
1 answer
267 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 ...
heenal sikka's user avatar
0 votes
1 answer
526 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 ...
mg92's user avatar
  • 37
0 votes
1 answer
402 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, ...
OiRc's user avatar
  • 127
-3 votes
1 answer
556 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 ...
sfdcDev's user avatar
  • 21
0 votes
1 answer
1k 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 (...
Taras Oleksiuk's user avatar
3 votes
1 answer
945 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 ...
Jeremy Mah's user avatar
0 votes
1 answer
187 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 ...
Jessica's user avatar
3 votes
2 answers
2k 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 ...
Mossi's user avatar
  • 3,906
0 votes
1 answer
378 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....
BoDiE2003's user avatar
  • 437
0 votes
1 answer
334 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 ...
Kyri Z.'s user avatar
  • 49
1 vote
2 answers
804 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 ...
Phuc's user avatar
  • 407
6 votes
2 answers
13k 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(){ ...
manchesterunited's user avatar
1 vote
2 answers
11k 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(); ...
KS Kumaar's user avatar
  • 753
0 votes
1 answer
745 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 ...
Json's user avatar
  • 1,587
-2 votes
1 answer
56 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 ...
Chanbasha Sk's user avatar
0 votes
1 answer
103 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='hen[email protected]'; a.Encrypted_Reference_Number__c= ...
keerthana chowdhary's user avatar