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
1answer
40 views

System.LimitException: Too many SOQL queries: 201

I know that this error is fed up, but i'm really doesn't know what i'm doing wrong? So the process: The batch starts every day and checks the value of FirstDateOfMonth__c = Today() and update the ...
2
votes
0answers
21 views

What's causing this large delay between entering a package and running a trigger?

A client has recently come to me with a performance issue with my managed package. He is running a test operation which causes a trigger in my package to run but when it does, the maximum CPU time ...
4
votes
1answer
72 views

Tools for code Evaluation [on hold]

is there any tools to test the logic at what point will hit the saleforce governor limits (applicable only)?? Any sophisticated tools other PMD to evaluate your code against the salesforce best ...
4
votes
1answer
251 views

Governor Limit on number of child records fetched

A SOQL query can return a maximum of 50,000 records, is there any limit on the number of child records that can be fetched in a SOQL query. Example, I have an Account name as 'DBZ' having more than ...
3
votes
1answer
38 views

Apex Batch Size Error - AsyncApexExecutions Limit exceeded

I have written a Batch Class which will Map Contact Object to lead Object. I have 6,000,000 which will be Mapped to Lead (like i am creating Lead using Contact Details). But when I am running the ...
0
votes
0answers
30 views

@ReadOnly thorwing System.LimitException: Too many query rows: 50001 error

I have nearly 300,000 account records in my org. I have the following class in my org: global class testReadOnly{ @ReadOnly webservice static List<Account> getAcc(){ return([...
0
votes
1answer
29 views

FATAL_ERROR|System.LimitException: Too many callouts: 101

I am trying to do a batch update that enters geocoordinates for 2000 records of a cuctom object called Property__c without gecoordinates using the following code: Batch global class ...
5
votes
1answer
54 views

What kind of actions open a query locator

We use a batched approach for read and update CampaignMember records within an external application (Webservice Connector, or WSC SOAP API). The approach can be described like this: Query campaign ...
3
votes
2answers
69 views

Catching Limit exception rows

i want to catch the limit exception, but I do not how. This is my code: queryCount = 'SELECT count(id) result FROM Product2 '; queryCount = queryCount + getWhereClause(); results = database.query(...
3
votes
1answer
38 views

How can be avoided error SINGLE_EMAIL_LIMIT_EXCEEDED Email limit exceeded if need to send email to one single user?

I have been looking for some time looking for a way how can error SINGLE_EMAIL_LIMIT_EXCEEDED Email limit exceeded be avoided if I need to send one simple email to one single user, for example, myself....
0
votes
1answer
33 views

Apex resource warnings

I'm using the following custom controller convertLeadToMerchant to convert Lead to Account object but receive the following warnings: Operation: /apex/convertLeadToMerchant By user/...
1
vote
2answers
42 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
25 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
100 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
29 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
39 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
1answer
21 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
81 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
39 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
27 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
28 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
65 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
107 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
65 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
49 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
239 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
38 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
121 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
16 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
29 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
33 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
35 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
76 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
84 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
32 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
240 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
45 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
41 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
952 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
56 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
166 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
228 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
255 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
170 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
53 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
60 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
53 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
270 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 ...