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

learn more… | top users | synonyms (1)

3
votes
0answers
21 views

Overcome 50,000 number of article limit

My company has around 80,000 articles, but salesforce has the limit of 50,000 articles. Is there way to overcome this using salesforce only. these article have information about diffirent products ...
8
votes
1answer
55 views

OAuth interactions: do they count as API calls?

OAuth token grants and token authorizations are human interactions that take place in the browser. And token refreshes happen to be machine interactions. Do any of the typical OAuth interactions count ...
4
votes
2answers
93 views

Subquery limit handling

Can someone help me in the below scenario. Scenario: I have a list of account id's. In that list of id's i want to separate the list of id's which have contacts associated to an account and the list ...
0
votes
1answer
23 views

Asynchronous Apex Limits

I was recently trying to create a set<id> myset, and then perform around 600 .add('...id...') calls, and finally select some records based on myset values. When trying to execute it it was ...
1
vote
2answers
49 views

What governor limits impact Apex Describe methods?

Are there any governor limits, or considerations that I should be aware of when using Apex Describe methods? So for example, the author of this blog post uses the structure below to get the record ...
0
votes
1answer
46 views

Process large amount of records in apex controller

I have a scenario where I have to get all the records of leads and find the record count for a particular field value and show them on a visualforce page but the problem is that I have around 5 ...
9
votes
1answer
222 views

Is it possible to have Test.startTest() and Test.stopTest() in a loop?

First of all, sorry that I couldn't frame the question better. But I will try my best to explain why I am asking what I am asking: There are multiple custom objects like Client_1__c, Client_2__c, ...
3
votes
1answer
36 views

Compiled Formula Size discrepancies

Due to the incorrect definition of Ceiling and Floor on Salesforce, I'm struggling with exceeding the max formula size. Following Salesforce's Tips for Reducing Formula Size, I've moved any duplicate ...
1
vote
1answer
65 views

Create test data with more than 10000 rows dynamically in apex

I am trying to Create test data with more than 10000 rows dynamically in a test class. Am hitting the dml row limit error (Too Many DML Rows: 10001). I dont want to use loaddata feature as I need to ...
0
votes
1answer
14 views

“Unsubscribe” from messages about limits

If I reach limits for my Salesforce edition I'm receiving message like "Hourly limit exceeded for processing workflow time trigger". Is there any way I can stop receiving these messages, like ...
1
vote
1answer
26 views

Salesforce Visual Flow reaching Governor Limits

I'm trying to run a Visual Flow in Salesforce that runs through all of a custom objects records called Cross Sells (~1,000,000 records) and updates a lookup field. This flow is failing due to the ...
2
votes
2answers
29 views

Trigger Help: Update Custom Email Field based on Value in Lookup Field (Lookup to User) Using Trigger

I am new to Apex and would like to practice updating a custom email field which derives its value based on a custom lookup field. I understand this can be done with a simple formula, but want to ...
3
votes
1answer
33 views

Governor limit on trigger clarification

If I have a below loop: List<id> var2=new List<id>(); for(Sobject1 s:trigger.new){ var2.add(s.Sobject2); for(Sobject2 var: [select Sobject2 from Sobject where Id IN:var2){ //do something ...
1
vote
0answers
34 views

ConcurrentPerOrgApex Limit exceeded

We are calling Queueable Interface from trigger to make multiple callouts to external systems. The number of callout from Queueable class is 50 as the other system can process only one record at a ...
0
votes
1answer
23 views

Number Of SOQL Queries 100 After Single Query In New Unit Test Method

In the below unit test my debug line System.debug('+++ Number of Queries used in this apex code 2.1 so far: ' + Limits.getQueries()); shows that the number of queries after my single query, in a new ...
0
votes
1answer
63 views

Query Activities on Lead

i need to query activities on lead. the idea is i want to get which lead has 10 activities with "unreach" subject and automatically change it to unqualified. i will use scheduled apex to daily check ...
1
vote
0answers
22 views

How can I find out what my concurrent requests are?

Is there a way to report/query on what my concurrent/long running requests are? Looking at this link I would like to be review my org and see if there are any processes getting close to, if not ...
2
votes
2answers
132 views

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

Design practises against 50,000 row limit

please see my scenario. I have 2 custom objects A(child) and B(parent>. Date model is such that Account is the master detail parent of A, while B is the lookup parent of A. The objects Account and B ...
0
votes
1answer
38 views

Solution to optimize code that exceeds limits of 50k rows returned

I would need guidance over how to avoid getting de 50k limit rows on one visualforce page that monitors the transactions that are going to be made on the present day + 2 next days, shows a lot of ...
6
votes
2answers
501 views

Exception: QUERY_TIMEOUT Your query request was running for too long

Querying on approx 25 million contacts using the following query in database.getQueryLocator. Used Query Resource Feedback (Link) to get some feedback about query and here are the results. Query - 1: ...
1
vote
0answers
52 views

System.LimitException: Too many SOQL queries: 101 in class and trigger

When I run the test class I get an error as follows: System.LimitException: Too many SOQL queries: 101 Stack Trace: Class.UpdateUserHandler.updateUserOnAccount: line 41, column 1 ...
6
votes
2answers
158 views

DML Limits are reset when?

I have a scenario where I need to update 500,000 Accounts in production to change their Record Type, but I want to avoid writing a Batch class for one-time use. In addition, using DataLoader would ...
3
votes
2answers
118 views

Large size file upload related to custom object

Is it possible to upload the files with size more than 25MB and can we show them in related list of a custom object? what is the best way to achieve this? Do we need to use external storage if the ...
5
votes
6answers
250 views

Is it a good practice to skip queries with empty conditions?

I am wondering if it's a good practice to skip queries when there's nothing in 'where' clause, especially in triggers. Like: if (idList.size() > 0) res = [select id from Case where id in ...
3
votes
1answer
149 views

Deployment Test Failure - Too Many SOQL Queries: 101 but Query isn't in a Loop

First: I know this question has been posted many times so I apologize for making a new one, but I read over a lot of the old ones and they almost always seem to be that the SOQL query is inside of a ...
2
votes
1answer
40 views

Do roll up summary calculations count against the CPU limit?

Hopefully a straightforward question - if I insert/update/delete records into an object that is a detail of another object, does the server performing the roll up summaries count against the platform ...
2
votes
2answers
57 views

Good practice in querying very large data from different objects inside batch process

Good day everyone, I have created an apex class which will save data from csv to account and contact object in salesforce. The concept of this class is that it will read the column in my csv and will ...
0
votes
1answer
48 views

Avoiding too many query rows error while querying a very large data inside the batch process

Good day everyone I have created a batch process in salesforce. To explain more, below code is quite similar with my problem. public with sharing class AS_batchUpdateContactStatus implements ...
1
vote
1answer
130 views

Loading 1 million records using bulk API: Exceeding batch Limit

Whenever records are inserted in Contacts(usually inserted in 1000's), we have a batch job that checks related customer account in SFDC and populates the contact.accountId field and couple other ...
2
votes
1answer
43 views

Test Class Data Setup - Governor Limits

The test method gets its set of governor limits, exclusive of the content between startTest and stopTest. I have faced the issue of 101 SOQL Governor Limits in test classes and mostly I have been able ...
0
votes
1answer
45 views

Apex governor limit warning - no sign of hitting limit

I'm receiving the following email every time I view a case: Operation: /apex/caseTiming By user/organization: 005a000000BTWwZ/00D30000000omsI Caused the following Apex resource warnings: ...
1
vote
1answer
30 views

Callouts Bulkification in triggers

When an account is saved(update or insert) - I want to take its address and then find out the corresponding latitude and longitude from the google maps geocoding api and then save the latitude and ...
1
vote
1answer
40 views

Where are the SOQL hits coming from?

I've created an apex class that simply generates random data. we have created a sort of "checklist", similar to the todomvc project, which has checklist items and checklist assignees (contacts that ...
3
votes
2answers
53 views

How to know current Email governor limits?

I am using SingleEmailMessage api for sending emails. I want to know the email limit quota usage, so that I can prevent further exceptions. Is there any way to know the quota usage in apex, so that I ...
1
vote
1answer
107 views

What happens to a Scheduled Job if the Apex Flex Queue is full?

Given that the limit on the Apex Flex Queue is 100, what happens when it is time for the system to execute a Scheduled Job (of a Database.Batchable), but the Apex Flex Queue is maxed out at 100? Is ...
2
votes
1answer
108 views

Calculate the data size of a given object

I am evaluating the possibility of using the new Platform Cache to store reporting data for each of our franchise records. I could possibly use a custom object instead but for every data point I want ...
0
votes
1answer
34 views

System.LimitException: Too many SOQL queries: 101 & CPU time exceeded

I am getting the following two errors in various scenarios of running an apex class 1) Too many SOQL queries 2) CPU time exceeded The following is the only method in my controller class for ...
0
votes
1answer
56 views

BATCH Class - Inner Queries - Questions/Doubts [closed]

I am doing few thing in Batch - and I was curious whether : My SOQL Queries will work with 50000+ records ? Will my SOQL's take too much time to execute and cause Time Out, etc ? SOQL SELECT ...
2
votes
1answer
48 views

Bulkify SOQL with multiple date comparisons

I am just starting out with apex and learning about bulkifying queries but I bumped up across a query that I am not sure how to bulkify. What I am trying to do is return a Count of the number of ...
4
votes
1answer
266 views

Why does it say my SOQL for loop returned 50,001 records when it broke the loop after 20k?

I have a SOQL for loop wherein the query sometimes returns more rows than the limit of 50,000. The code block executes once per record returned by the query, and in that code block is an if statement ...
1
vote
1answer
60 views

Apex governor limit warning emails

I have VF pages linked to custom controllers which query thousands of organization records and display them. I get the following email Operation: /apex/SingleTicketAudit By user/organization: ...
1
vote
2answers
36 views

How to push Account changes down Account Hierarchy

I need to push some field updates, down to all the hierarchy of accounts. I created a flow, which goes over all accounts with the parentId I need Step details: I auto-launch this with a ...
5
votes
1answer
153 views

Testing Recursive Queueable Class

I have an Apex class that implements the Queueable interface which is used to remove custom objects attached to a set of Account Ids, and then inserts new custom objects to replace them. The volume ...
-2
votes
2answers
118 views

Too Many Query Rows 50001 - even with limit

I'm getting a "Too Many Query Row 50001" error even if I have a limit of 1000. Want to know what I'm doing wrong or clause I am missing. public Task[] getListTasks() { List<Contact> cntct = ...
2
votes
1answer
251 views

Limits.getDMLStatements() / Limits.getLimitDMLStatements()

Can anybody explain me the diff. and why I'm getting the following results Limits.getDMLStatements() = 2 and Limits.getLimitDMLStatements() = 150 List<Account> acc = [SELECT Id FROM Account ...
3
votes
1answer
316 views

How to SOQL query contacts by phone number when there are more than 100,000 contacts

I am receiving a System.QueryException when searching for contacts by phone number in an APEX class: An error occurred at element myRule_1_A2 (FlowActionCall). An Apex error occurred: ...
9
votes
2answers
164 views

How to debug hitting CPU time limit

We have a very slow save happening in Salesforce. Most of the time it succeeds, but is probably just under the CPU limit. If I enable debugging, then the overhead associated with debugging causes it ...
1
vote
1answer
100 views

How SOQL For Loop instead of SOQL may solve System.LimitException: Too many query rows: 50001?

I have two custom object, Master__c and Detail__c. There is lookup relationship on Detail__c to Master__c ( since some Detail__c record may not have a master ). To calculate total count field on ...
1
vote
2answers
51 views

HTTP Request contributes to what limits on force.com platform?

There's a per-apex-session limits which HTTP Request, like how many request can be issued inside one apex session, in total how much time the http request can spend. Besides those, what else limits ...