Questions tagged [limitexception]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
75 views

OrgLimits.getAll() works only with Anonymous apex and gives exception when used in any other context

I have a simple command on Orglimit which runs fine if run in anonymous as below system.debug(OrgLimits.getAll()); 20:25:55:076 USER_DEBUG [2]|DEBUG|(OrgLimit:[delegate=apex.sfdc.orglimits.OrgLimit@...
1
vote
0answers
45 views

Test Class failing with Too many SOQL queries: 101

My test class is public static testMethod void loanSetDelegatedApprovers() { list<User> userList = new list<User>(); list<Approval_Delegate__c> adList = new list<...
0
votes
2answers
30 views

Why catch code of an try catch exception are not executed when System.LimitException: Too many DML statements: 151

I have the next code block that generates a limitException: Account myAccount = new Account(Name = 'MyAccount'); Insert myAccount; For (Integer x = 0; x < 150; x++) {Account newAccount = new ...
0
votes
1answer
122 views

Conflicting triggers

I'm still new to Salesforce and still can't grasp regarding triggers. Scenario: My company's salesforce workspace has a managed package app installed. The managed package app has a custom trigger for ...
0
votes
1answer
68 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
63 views

Apex trigger Too many SOQL queries: 101

Getting an error in Line 8 in the query in the constructor contactFindNextLastVisit. Can someone see what that might be? There are no SOQL statements in for loop. public class ...
4
votes
3answers
2k views

Storable Action - System.LimitException: Too many DML statements: 1

@AuraEnabled(cacheable=true) public static String deleteContacts(List<String> contactIds) { List<Contact> returnList = new List<Contact> (); String query = ' SELECT Id,Name, ...
2
votes
1answer
40 views

how to abort upload file when filesize is too large

I have a apex:inputFile tag to upload a file I gave it an id to throw an error if the filesize exceeds 500k. The error is thrown but still I can see in my left corner of my chrome browser an attempt ...
0
votes
1answer
98 views

Maximum stack depth reached: 1001 inner class

I'm trying to export record on into a tab separated text file. In getting Maximum stack depth reached: 1001 in the inner class where i'm doing the piece of code and I have pasted full code in the ...
0
votes
1answer
41 views

MassEmailMessage vs “Too many Email Invocations: 11”

I don't know, how to fix it: my messages are in List. Helper: public with sharing class Helper { public static void afterInsert(List<P__c> newList, Map<ID, P__c> newMap){ List<...
0
votes
1answer
21 views

message: System.LimitException: Too many query rows: 50001 Class.CollectionMaster.getCollectionMaster: line 16, column 1

@RestResource(urlMapping='/CollectionMaster/*') global with sharing class CollectionMaster{ @HttpPOST global static CollectionWrapper getCollectionMaster(String userName){ list<...
0
votes
3answers
49 views

System.LimitException: Too many query rows: 50001 Class.CollectionMaster.getCollectionMaster: line 17, column 1

@RestResource(urlMapping='/CollectionMaster/*') global with sharing class CollectionMaster{ @HttpPOST global static CollectionWrapper getCollectionMaster(String userName){ list&...
0
votes
0answers
48 views

used system.enquejob but still facing System.LimitException: Too many future calls: 51 [duplicate]

My trigger trigger triggSendRebateData on RebateData_for_MC__c (before insert,before update) { List<RebateData_for_MC__c> lstRebateData = new List<RebateData_for_MC__c>(); for(...
3
votes
1answer
252 views

How do I replicate an apex heap size exception in a test class?

We've received an Apex heap size too large error intermittently which we'd like to first capture and exit gracefully, and then to fix long term. Questions: Is it possible to catch a heap size ...
3
votes
2answers
1k views

System.LimitException: Too many SOQL queries: 101

I am calling sendemail() from visualforce.There are no SOQL Queries inside for loops but am getting error in controller. If I comment below two lines then am not getting error Messaging....
0
votes
0answers
311 views

How to solve Limit Exception : Too many query rows 50001

I have a code which retrieves and displays the results in the VF page from REST Web-Service. In one sandbox , it's working fine. But in other sandbox it returns following error: Limit Exception ...
0
votes
1answer
160 views

System.LimitException: Too many SOQL queries

I wrote a trigger to update a field (boolean value) in LEAD when a TASK is added to the lead. Trigger works fine in DEV box but when I deploy it, its giving me Exception error clashing with one other ...
12
votes
1answer
2k views

Is DML not allowed in a Visualforce getter?

Summary I am trying to simplify some code for a page that makes a callout, then logs the request and response. I stumbled across a scenario in which the log record appears to create successfully, but ...
4
votes
1answer
127 views

Querying of Apex Properties

In a controller for a visualforce page, that I have constructed, I have the following: public User current_user { get { return [SELECT Name /*... other fields ...*/ FROM User WHERE Id =: ...
0
votes
1answer
433 views

Creating Tasks - System.LimitException: Too many DML statements: 151

To complete this challenge, you need to add a trigger for Opportunity. The trigger will add a task to any opportunity inserted or updated with the stage of 'Closed Won'. The task's subject must be '...