Stack Exchange Network

Stack Exchange network consists of 174 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

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 ...

0
votes
3answers
48 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
169 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
57 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 ...
2
votes
1answer
28 views

Transactional governor limits and managed pacakges

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 ...
1
vote
1answer
42 views

MC AMPScript RetrieveSalesforceObjects() hitting governor limits

Imagine a scenario where we have a Marketing Cloud connected to a Sales Cloud. Around 1500 campaign members will enter a journey at approximately same time and then each of those members will receive ...
0
votes
1answer
50 views

REQUEST_RUNNING_TOO_LONG

First error: [REQUEST_RUNNING_TOO_LONG] Your request was running for too long, and has been stopped. I was looking at What causes REQUEST_RUNNING_TOO_LONG test errors?. I was guessing because its a ...
0
votes
0answers
24 views

Did not receive exception email in production

We usually get exception emails to our admin from the production. I have a asynchronous code running in production @future public static void processRecords(String FIMCJSONRec) { ...
0
votes
1answer
34 views

Batch Apex Chaining Limits

I have seen Apex Batch Job Chaining Limits, but my questions is little bit different so still wanted to confirm. I was looking to chain 3 batch classes. Below would be number of batch classes. ...
6
votes
1answer
160 views

Lightning component limitaion

Just wondering -- How many records can be shown on a lightning component without doing the pagination. Do Components have the limitaions just like that of VF pages?
0
votes
2answers
40 views

Governor Limit Exception and Finally blocks

We all know that if you hit a Governor Limit Exception, your code/application will terminate with an unhandleable exception know as a Governor Limit Exception. My question is does your code ...
0
votes
0answers
20 views

First error: ContentPublication Limit exceeded [duplicate]

I am receiving the above error upon executing anonymous code of a test class. All I am executing is database insert of 200 records each time (total 14000 records). The primary aim is to insert all the ...
0
votes
2answers
73 views

Clear platform event limits?

Where can I find clear docs on the API limits for sending platform events IN to sfdc? The platform events basics trailhead notes that: provides allocations for how many events you can define in ...
0
votes
1answer
23 views

Estimate the number of queries per month

Is there any way to estimate the number of Queries per month in a salesforce instance?
0
votes
1answer
21 views

passing an instance of the class Limits

There is a class Limits that allows to keep track of the governor limits. I need to capture 6 of the governor details of this class, that is why I need to pass an instance of the class Limits to a ...
0
votes
1answer
34 views

parent-child relationship subqueries not contributing to governor limits

As per the article Execution Governors and Limits In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. The row counts from these ...
3
votes
2answers
59 views

How many DML statements will be execute for below code?

Below is the logic/Method i have built to eliminate error while inserting case Object. Consider a example when i try insert case object inside try block, if it is throwing an error while inserting, I ...
0
votes
1answer
26 views

Maximum number of children allowed in a parent-to-child lookup relationship

Is there any limit on the number of children a parent can have in a lookup relationship? If there is no limit, Is there any good practice guideline with regards to the number of children added to a ...
3
votes
2answers
43 views

Why is my Trigger running this many times on one order update?

I was hitting SOQL query limits in my Test class so I thought I'd test things out with some Limits.getQueries() bench-marking. I replicated the use case that would fire the trigger on 1 Order and ...
1
vote
2answers
35 views

What is the maximum number of records which can be insterted in Apex REST calling a POST method?

I have an Apex REST class with a POST method: @HttpPost global static List<Id> doPost(List<TaskWrapper> tasks) { List<Task> tasksToInsert = new List<Task>(); for (...
2
votes
1answer
246 views

Heap size error

I'm facing the error similar to given here (First error: Apex heap size too large: 12000354) to avoid this what I'm trying to do is, I'm inserting the csv file when my first batch run and then in sub-...
1
vote
2answers
99 views

Apex CPU timeout: has it been increased for synchronous transaction?

I was just trying out some code and accidentally found that the code was running more than 10s. I was able to make the code run (anonymously from dev console) upto 15 sec beyond which it timed out. ...
0
votes
1answer
22 views

How can I report on Salesforce's 'External Email limit' for my specific organization?

I was looking at the Governor Limits page: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm And I wanted to see if we can see how close our org comes to ...
2
votes
2answers
76 views

Determine whether Apex transaction is asynchronous

According to the Execution Governors and Limits the limits for either synchronous or asynchronous transactions can vary, that is why I would like to check whether my current apex transaction is ...
0
votes
1answer
113 views

Difference between dataloader and dataloader CLIq and dataloader.io? [closed]

Can any one explain difference between normal data loader and data loader CLIq and dataloader.io? and What are the governor limits?
0
votes
1answer
39 views

How to query Id and Name for multiple SObject types without a for loop?

I know having a query in a for loop is bad practice because you can easily hit the governor limits but am having trouble working out a better way. What I'm trying to do is get the Id and Name of all ...
3
votes
0answers
139 views

Bulkify existing flow to avoid SOQL Limits?

I currently have a flow that looks up and passes the ID of a Fire Department into an object called Service Plan. The Fire Department is found by looking up the BillingCity on the Account associated ...
1
vote
1answer
49 views

How to use this getLimitQueryLocatorRows() before actual query

I want to make use of getLimitQueryLocatorRows() before i use the below code and throw exception or custom error message accordingly. Is this possible? SetCon = new ApexPages.StandardSetController(...
1
vote
1answer
64 views

What exactly is execution time limit of 10 minutes?

Execution Governors and Limits documentation says that Maximum execution time for each Apex transaction is 10 minutes for both Synchronous and Asynchronous To understand this I executed the ...
0
votes
1answer
73 views

SOQL Query Limit to 50000 records

I was wondering if there is any way of updating an account field in APEX if i have the account ID in the Triggered Object. Right now i am running into the issue that I can not do the following (...
0
votes
2answers
41 views

how to programmatically identify Salesforce Governor limits are hit? can i create a workflow each time when governer limits are hit?

I need a way to programmatically identify Salesforce Governor limits and get an alert when the limits are hit.
0
votes
1answer
26 views

Report from Custom CSV Visualforce hits CPU Limit but works after reloading page

I have a Visualforce page that exports a custom CSV File. This report is very big and have a lot of processing on it thus causing sometimes CPU Limit. The problem is that for some users always on the ...
1
vote
2answers
161 views

How can I know the Rest Request and Response size?

I am writing an Apex Rest web service and I do not want to hit the cap of 6 MB on request or response payload or the 12 MB limit for asynchronous APEX. But the size of the request and responses are ...
0
votes
2answers
47 views

Seeing the View State for a page in a managed package in customer orgs

We have a managed package that we have installed in customer orgs. One of the pages shows the error below when loaded: I know I can go to user settings and turn on "Developer Mode" and "Show View ...
4
votes
2answers
107 views

What user actions cause an API call?

Recently we have hit the API call governor limit and since then we are looking at the administrative report 'API Calls Made Within Last 7 Days'. The Salesforce documentation states What counts ...
1
vote
3answers
167 views

Mass Updating Accounts( more then 20k) in Production through developer console

I have to run manual one time script on produciton for mass updating accounts. I would need help for best way so that below scripts would not hit apex limits. Is there any other way by which i would ...
2
votes
1answer
469 views

How do processes consume SOQL queries?

I'm currently using processes to update records. The ills describing of using the process builder are known to me, but I need more information on how 'Update Record actions' in a process are bulkified....
1
vote
1answer
195 views

How is calculated “24-hour period” for the limitation of Asynchronous Apex Executions

I have a question regarding Execution Governors and Limits for daily maximum number of asynchronous Apex method executions. In the Salesforce documantation it is written, that the maximum number of ...
7
votes
2answers
140 views

Do Lightning callbacks (in Promises) get their own scope/governor limits

My apps use promises (using the Lax library) quite heavily and I have seen that different callbacks often produce their own log in the Dev Console. Does this mean that: Each callback gets its own ...
0
votes
1answer
172 views

Aggregated Query Too many query rows

I have this aggregated query which seems to return only 1050 rows but still I am getting a limit exception. This is the APEX query: AggregateResult[] groupedResults = [SELECT COUNT_DISTINCT(ID) cnt, ...
5
votes
1answer
111 views

Optimizing Batch Apex for large number of rows with minimal processing

We have an object that may have millions of records (for simplicity, we can assume <50m). We need to process those millions of records to do some simple calculation on one of the fields. One ...
1
vote
1answer
46 views

SOQL aggregate maxing out SOQL limits

I'm having trouble with my SOQL, running into SOQL limits in production. My SOQL is counting all active Users grouped by their Freeze status. How do I re-write the following SOQL without a subquery. ...
0
votes
0answers
66 views

Apex Cpu Limit Exceeded Error in trigger

I have written trigger in salesforce code,it is already bulkified,But i am getting cpu limit exceeded error,while updating 200 records using Workbench Trigger code: trigger AccountTrigger on Account ...
0
votes
1answer
76 views

Size Limit in response. Visualforce pages

We have created an app that includes a Visualforce page with an Angular dev inside. We use Javascript Remoting / RemoteActions to connect the Javascript code to the Salesforce Server. We have faced ...
1
vote
2answers
190 views

First error: Too many query rows: 50001

I have a read query in a batch class which in orgs with a lot of data can bring back over 50,000 records and violate the governor limit. I am trying to hard delete records. I am using the class below ...
0
votes
3answers
27 views

WHERE Query within SOQL Limit Issue?

I had never tried this before but another developer passed it along as a method to refine a SOQL query to find Accounts that didn't have Opptys: List<Account> accts = [SELECT Id, Name FROM ...
2
votes
1answer
46 views

Short delayed (asynch) related record updates

I feel like there should be a straightforward answer here, but I'm coming up short... Trigger event: Account lookup field on Lead(s)/Contact(s) are updated OR a particular Account field is updated ...
0
votes
1answer
59 views

Help on Cases batch class

I have created the batch class which will store the count in other object with status "New" and "Closed" I have 60 Case records with 25 as "New" status and remaining with "Closed" status when i am ...
0
votes
1answer
115 views

FATAL_ERROR|System.LimitException: Too many Email Invocations: 11

I am writing a batch class to send the emails based on certian criteria. I see that the parameters are passed right, no errors, but I end up receiving multiple duplicate emails when I run it. Here is ...
4
votes
3answers
229 views

Managed Package: How huge it could be?

With time passes and development moving forward our managed package becomes bigger and bigger. It takes up to 2 hours to deploy it and upload the package with all test executions, analyzes etc. So I'...
0
votes
0answers
32 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(...