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)

1
vote
2answers
41 views

workaround sql govenor limits

I am building this program that will generate numbers in fields based off of other records in that object. As such, queries will be needed. I have the program to the point where it will update when ...
3
votes
1answer
20 views

Schedule/Batch large number of webservice callouts?

I'am new to Apex and I have to call a webservice for every account (for a large number of accounts). Usualy a single webservice request takes 500 to 5000 ms. As far as I know schedulable and ...
1
vote
1answer
66 views

CPU Timeout limit exceeded exception caused for existing working code after SF upgraded to Summer'16,. Any idea if anything updated in Summer'16

I have a code which was working for my previous packages. But after the Summer'16 release I am getting the CPU timeout exception for my codebase which was working earlier. Is there any thing update ...
1
vote
2answers
28 views

FATAL_ERROR|System.LimitException: Too many DML statements: 1

Facing an issue when we want to update our payment object in bulk. Works fine on sandbox but throws an exception error in production. Mentioning the controller below. The Error occurs at update ...
1
vote
0answers
30 views

Does execute anonymous from Developer Console not enforce heap size limit?

I have been investigating a potential heap size problem in our production code, and I wanted to recreate some simple elements through the developer console. To cause a heap size exception, I would ...
0
votes
0answers
10 views

Auto-generate multiple Remedyforce Incidents and Tasks through back-end

I am attempting to create Remedyforce Incidents and Tasks upon the approval of a request in another custom Salesforce app we are using. However, I am only able to create 4 Incidents in one instance ...
0
votes
1answer
19 views

how to know if our org. has sent more than a 1000 emails on a specific date

I am working on a requirement and needs to know how to know if our org. has sent more than a 1000 emails on a specific date. I have found the following code : System.debug('limits....
2
votes
1answer
77 views

Is lookup in Visual workflow a kind of SOQL?

I'm new to visual workflows and while I was creating one I got this question. Does Any lookup (Fast/Record) adds SOQL to the given transaction and may cause governor limit hit? I want to use multiple ...
1
vote
1answer
35 views

Too many query rows: 50001 in process builder?

I am getting a Limitexception from the processbuilder, when updating a single Opportunity. The only thing which happens in my Process is that the Owner and one field is being updated by values of the ...
1
vote
1answer
22 views

Limit for number of files AND size to upload in salesforce?

On my page I have an <input="file" /> and I allow the users to select as many files as they want before they insert them in salesforce. When the user triggers the uploading process I pass each ...
3
votes
0answers
25 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
64 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
104 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
26 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
57 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
48 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
231 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
95 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
15 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
34 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
58 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
25 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
78 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
25 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
179 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
42 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
747 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
53 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 Trigger....
6
votes
2answers
161 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 ...
4
votes
2answers
175 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
254 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 :...
4
votes
1answer
159 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
46 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
59 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
51 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 Database....
1
vote
1answer
197 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
49 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
41 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
56 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
127 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
152 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
36 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
58 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 id,...
2
votes
1answer
53 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 ...