Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [governorlimits]

Governor limits are limits enforced by the Apex runtime engine to ensure that runaway Apex does not monopolize shared resources in the multitenant environment. These limits are tracked and enforced during the execution of Apex code and if a governor limit is exceeded an uncatchable runtime exception is generated, such as "Too Many SOQL Queries".

0
votes
0answers
17 views

Process builder and mass update

My question is about behaver of Process builder when we do mass update with ListView or Data loader. Is it triggered sepeparately for each record? If not and it is mass triggered how can we secure it ...
0
votes
1answer
33 views

List.clear() not emptying my List

The project that I am working on has an API endpoint that is meant to upload a large number of records into three different tables: Careers, Degrees, and CareerDegreeRelationships. The endpoint is ...
1
vote
0answers
32 views

How to design Flows to stay under new per-month governor limit? [closed]

As I am aware, the "Maximum Flow Interviews Without UI per Month" governor limit is relatively new in a recent release of Salesforce. One of my Salesforce orgs has a few hundred Salesforce users and ...
1
vote
2answers
135 views

How to be able to process a large JSON response?

We're calling an external REST service from Salesforce and are receiving a JSON response of more than 45 MB. Has anyone attempted anything like this?
1
vote
1answer
46 views

Searching for records in list view when more than 2000 rows

I have a custom object that has more than 2000 records. I have a custom field, id__c, that is a number that is searchable. The records I have in there have id__c's ranging from 1 to 3000. I am ...
1
vote
2answers
57 views

What are the limitations of number of Rows that can be returned in an Aura Enabled APEX Method?

I keep reading conflicting answers about how many rows an SOQL query can return in an APEX method. Some say 200, some say 2000, some say 50,000, and some say 1 million (read only). I am looking for ...
2
votes
2answers
99 views

Concurrent requests limit exceeded - how to find the problematic code

I am a developer for a Salesforce org that serves as a community portal for thousands of users. We have been consulting with a large team of developers for years and everything we have is custom coded....
1
vote
1answer
17 views

Platform Event batching

I have a simple Platform Event called Timesheet_Approval__e. As a test, I publish a batch of 1000 events with this anonymous apex: List<Timesheet_Approval__e> approvals = new List<...
2
votes
3answers
106 views

Overcome Queueable maximum depth limit in dev orgs

To migrate "trees of related data" from an external system to Salesforce I am using dynamic chains of Apex Queueables. Imagine I am "synchronizing" Accounts, Opportunities and Contacts from an ...
2
votes
2answers
275 views

Is there a limit on the maximum number of future jobs queued in an org?

I know there are certain limits with batch jobs, queued jobs, etc., but what about future jobs?
0
votes
1answer
33 views

Find how many System.Debug lines are there in sandbox environment?

I want to find how many System.Debug lines are there in sandbox environment. As System.Debug statment is Consider in Apex character limit count. So Is there any tool or any method such as Tooling ...
4
votes
1answer
31 views

Which scheduled jobs count towards the max concurrent scheduled jobs limit?

Per the docs we can only have 100 scheduled apex jobs at any one time in most orgs (5 in dev orgs). Which jobs count towards those limits? Would the following query return the right number? SELECT ...
0
votes
1answer
38 views

Efficient SOQL for record classification

I need to "classify" an incoming Record A based on several related fields on records B,C,D,.. etc. Therefore I need a trigger that is triggering (:D) on this new record and check more then 5 lookup ...
0
votes
1answer
76 views

Are there governance limits on lightning web components

Was curious. Client wants us to render data from an external database in a lightning web component data table. In this situation, as a front ender, I would typically just make an API call out from the ...
23
votes
1answer
259 views

Why am I double charged on DML limits in a process builder?

This question is a follow-up from another question where the accepted answer states that for each Update Records action in a process, following limits are consumed: As you can therefore conclude, ...
0
votes
1answer
20 views

Email sent from Lead is counting under daily limit

I was going through the salesforce document Daily Allocations for Email Alerts It is mentioned that There’s no limit on sending single emails to contacts, leads, person accounts, and users in your org ...
0
votes
1answer
59 views

Too Many SOQL Queries error

I am coming into this problem in my debug logs. But when I'm reviewing the logs I am only seeing individual reads of SOQL query counts from various apps such as : Number of SOQL queries: 5 out of ...
0
votes
1answer
33 views

Is there a better way to create related records when creating test data?

I am trying to create a large set of test data along with child records and this is what i came up with. Could anyone let me know if there's a better way to achieve the same? Integer countStart = ...
4
votes
1answer
46 views

How to get a JSON formated snapshot of the current Apex limits with minimal code

I know how to do this technically. Create a class with fields for all Limits and JSON.serialize it. But I thought maybe there is a way to get all limits as map an skip the class writing step. I know ...
1
vote
1answer
21 views

How can I tell what the 'Maximum number of batch apex jobs queued or active concurrently' limit is in our org?

Is there a way I can tell what the 'Maximum number of batch apex jobs queued or active concurrently' limit is in our org? Usually it is 5 (Refer to Page 3 in this document), but I believe our org has ...
0
votes
1answer
18 views

LDV : What is max records that aggregate query can work with?

I am having difficulty understanding limits on aggregate queries. Salesforce Documentation for ReadOnly Attribute of Visualforce Page says Normally, queries for a single Visualforce page request ...
0
votes
0answers
19 views

Count the 5 queued or active batch jobs that is allowed for Apex

I am trying to update my code from sequence queueable to sequence batch. This is the link of the code I've tried to update Run Queueable as sequence, The problem I have at the moment is that this ...
0
votes
2answers
61 views

Bulk data loader operations:: System.LimitException: Too many SOQL queries: 101

I am getting an error while performing data loader operations on the Leads object as I get this error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:LeadTrigger: System.LimitException: Too many SOQL ...
4
votes
2answers
77 views

Hitting the governor limit of SOQL in recursion, how can I avoid this in recursion of getTreeData method?

public class BOM_Container_TreeController { @AuraEnabled public static String getTreeData(String acId){ List<HS_Sales__Bill_Of_Materials__c> boms = [Select Id , Name from ...
1
vote
2answers
59 views

SOQL governor reached using multiple strike_lookup

I'm developing a custom lighting component, in which I have a table with 2 columns, each cell is composed by a strike_lookup Everything works as expected until I have too many rows, thus too many ...
8
votes
1answer
86 views

Slow scratch orgs causing Apex CPU time limit to be hit about 20% of the time - any workarounds?

We have an SFDX build set up that runs our 2,800 tests against 6 different scratch org configurations in parallel. But every build fails on what seems like a random one of the scratch orgs (i.e. it ...
0
votes
1answer
52 views

Salesforce Standard API - Composite Tree resource

In order to create record in bulk using REST API, we using Composite Tree resource. I'm trying to upload a bulk of content versions : {"records" :[ { "attributes" : {"type" : "ContentVersion", "...
0
votes
1answer
109 views

Outbound email message with attachments limit

I am using Apex to send emails with attachments to users (with SingleEmailMessage to be more precisely). From some MB (I Don't sure exactly the size - because it changed from time to time when I try ...
2
votes
1answer
73 views

Maximum number of records retrieved by one SOQL query in a lightning Apex backend controller

What is the maximum number of records retrieved by one SOQL query in a lightning Apex backend controller? According to this: Total number of records retrieved by SOQL queries | 50,000 But for me ...
1
vote
1answer
110 views

Salesforce Standard API - Content Version

I'm trying to send an array of content versions via the Standard API that Salesforce suggests : Using POST method to : https://SandboxName.my.salesforce.com/services/data/v43.0/sobjects/...
1
vote
2answers
82 views

Limits API callout in Apex

I want to receive daily limit from apex. There is my code public static HttpResponse getLimits() { HttpRequest req = new HttpRequest(); Http http = new Http(); req.setMethod('GET'); ...
9
votes
3answers
173 views

Platform Event Apex trigger limits exception - where does it go?

If one publishes a Platform Event, the consuming trigger executes as Automated Process user. If that consuming trigger exceeds CPU limits, no notification is sent to the developer(s). Even though ...
1
vote
1answer
40 views

Are trigger limits applied for every flow

I'm checking an integration to a SF org and it seems to be hitting "Apex CPU time limit exceeded" and it is brining up different sources. Sometimes it breaks during a process builder action from a ...
1
vote
2answers
76 views

Query Limit on Batchable Class

What is the best practice with governor limits with Batchable classes and queries inside of the Batchable class? I am running into query limits with a Batchable class because I have too many ...
3
votes
0answers
86 views

Synchronous concurrent transactions limit

I know that the following limits exist in salesforce: Number of synchronous concurrent transactions for long-running transactions that last longer than 5 seconds for each org : Limit 10 Concurrent ...
1
vote
2answers
183 views

How to resolve Webcallout error System.LimitException: Too many callouts: 101 when displaying data on Lightning component

I'm making a webservice callout to an external webservice and displaying data on a Lightning component. Data is returned in JSON format in multiple pages. Each page has 50 records. In my apex ...
1
vote
2answers
64 views

Heap size LIMIT

I'm trying to reduce the heap size limit while a program is running - I'm doing it by taking the data (a list for example) and after I'm using it, I'm assigning the instance to a new List : Example: ...
0
votes
1answer
52 views

Too Many SOQL queries: 101 Exception

trigger SoM_RequestCancelledOnFeePayment on SoM_Request__c (after update) { if (!SoM_Utilities.gs.Disable_Triggers__c) { List<MUSW__Fee_Payment__c> feePymtsToUpdate = new List<...
1
vote
1answer
170 views

Salesforce limit of synchronous rest service

I have to implement in salesforce many inbound synchronous rest services. What are the salesforce limits that I have to consider? I found only the following: API Requests. A long-running API request ...
2
votes
2answers
86 views

Map / Trigger / Governor limits

While studying for my Platform Developer 1 exam, I came across this line. Could someone please explain how this is the case? Question: How can a developer avoid exceeding governor limits when using ...
0
votes
1answer
35 views

Optimal number of records per batch

I have a problem executing a batch in some limit cases that i want to cover to avoid future concerns. The scenario is the following: My batch works on n(reasonable high number) records of the same ...
1
vote
1answer
243 views

Governor Limits on Salesforce Government Cloud

Considering Salesforce Government Cloud is a partitioned instance running on dedicated resources (and also because it's for government needs), are governor limits more relaxed for these instances? ...
1
vote
2answers
414 views

Limitation on external system calling Salesforce

Is there any limit on how many times an external system can call Salesforce to get data? For example, ETL Tools, Mulesoft etc.
7
votes
1answer
120 views

Create Case thread Id using Apex (SOQL limit-proof)

There are many posts about creating Case threadIds with Apex, notably Case.Thread_Id, is Thread_Id a field on Case object? As the posters have noted, the SFDC rules of the threadId are subject to ...
1
vote
1answer
69 views

Can we avoid 'Attempted to schedule too many concurrent batch jobs in this org' error using Apex flex queue?

We have a batch class AccountDeactivationBatch from whose finish() method we run 3 more batches, including AccountDeactivationBatch again, but with new set of Ids. These new set of Ids are all ...
0
votes
2answers
241 views

Trigger error - Too many DML rows: 10001

I have tried to optimize the code, but still it throws the error: Too many DML rows: 10001 Below is my code: if(setAccID != null && !setAccID.isEmpty()) { list<Custom__c&...
0
votes
3answers
163 views

Avoid 'Apex CPU time limit exceeded' with Batch Process

I encountered this error and have trouble with performance tuning. I tried asyncronous approach, but Apex CPU time limit exceeded occurs continuously. Anybody can make it more efficient? Here is ...
1
vote
2answers
443 views

Batch APEX requiring two queries and hitting limits

I have a batch APEX class that is used to delete any contacts that have been created over a year ago and have no related opportunities. I have queries for the contacts in the QueryLocator. I am then ...
4
votes
1answer
67 views

SOQL Count() limits

Summer '18 changed Count() impact on query row limit from "number of records matched" to 1. Is there still some form of a limit, like selectivity criteria related limits, or can an arbitrary number ...
4
votes
1answer
144 views

Transactional governor limits and managed packages

My company is looking to install a very large managed package into our org, which has a significant amount of custom apex as well as several other large managed packages. As we test the package in ...