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)

2
votes
1answer
16 views

Governor Limits Across Object Triggers

I am architecting a solution and wanted to know whether information exists regarding the depth of governor limits, when a trigger invokes another trigger (different objects). For example, I have 2 ...
1
vote
0answers
8 views

API call counts if use Salesforce Workbench Developerforce

I recently had issue with my org with exceeded request limit and I usually used developer console a lot but if I use workbench.developerforce will that still be count as API calls and account to my ...
0
votes
0answers
23 views

REQUEST_LIMIT_EXCEEDED from Salesforce.com API

All my code is bulkified and I'm not sure what is causing that to get me the limit exceeded, is there a way to find out what page or trigger causing? if I use Database.query approach will that not ...
0
votes
1answer
21 views

Synchronous Limit and asynchronous Limit in apex

can anybody tell me that what is difference between Synchronous Limit and asynchronous Limit in soql governor limit in apex?
1
vote
1answer
16 views

Incremental SOQL vs SOAP API calls

I am retrieving records that have been updated/deleted after every backup, i.e. Incremental backup procedure. There are different options to pursue with this: Bulk - Cannot support all the objects ...
1
vote
1answer
38 views

Select Count() with dynamic SOQL - how to stay in Governor Limits?

I am trying to fix my code so I don't hit any governor limits on my SOQL queries. Long story short: I am just learning on how to use maps, but I'm trying to figure out how I can do a SelectCount ...
0
votes
1answer
38 views

How to avoid writing Select statement within for loop

How to write a select statement in For loop I have a requirement as below we need a trigger to insert record into Location object everythime an Account record is added/update but it has to check if ...
1
vote
2answers
80 views

soql limit exception

I am getting a SOQL System.LimitException. I know there is a query within a for loop. But it's my work, it needs to be there. What i wanted to do is handle this exception in apex controller like ...
4
votes
1answer
75 views

Number of callouts allowed from batch execute method showing zero?

I have the below sample code: global class BatchApexExample implements Database.Batchable<SObject>{ public Database.QueryLocator start(Database.BatchableContext bc){ ...
2
votes
1answer
49 views

How to Reproduce the Concurrent Requests Limit?

I'm trying to write code that will reproduce the Concurrent Requests limit (10 requests longer than 5 seconds, described here: ...
1
vote
2answers
46 views

Apex CPU Time limit exceeded while generating a page/PDF with a LOT of data

There are quite a number of posts I went through that talk about 'Apex CPU Time limit exceeded' issue. I am looking for some advice on how to work around this problem with my situation in mind. We ...
0
votes
1answer
42 views

My test class won't pass

Requirement: When an email is synced to Salesforce from Outlook, whatever Lead or Contact is associated with it needs to have the custom field Email_Opt_In__c checked. That part is working just fine. ...
2
votes
2answers
67 views

APEX CPU Time limit exceeded error. Any suggestions?

We have this nightly code that runs in our org. Recently, we started receiving APEX CPU Time limit exceeded errors and we're looking for ways top optimize the code. Anyone have any suggestions on ...
0
votes
1answer
34 views

Trouble with converting leads with triggers getting 101 queries

I have a set of business rules for assigning leads to the correct salesperson that runs in a before trigger. Then in an after trigger if a field is filled in auto convert the lead. The trigger makes a ...
1
vote
1answer
62 views

Process Builder - Adding new processes makes old processes not work

I have been using Process Builder for a few weeks now. Its main purpose for me has been in its ability to update records in my database without having to click "edit" and "save". I have certain ...
-1
votes
1answer
43 views

Getting Response size exceeded 15MB organization limit on VF page [duplicate]

I am getting the Response size exceeded 15MB organization limit error when i clicked a button from VF page which is not able to trace in debug logs and the debug log as follows: Number of SOQL ...
2
votes
1answer
101 views

limit for dashboard run as as the logged-in user

After I've created a certain number of dashboards set for running as the logged-in user, Salesforce tells me I cannot create another one. In order to solve this problem I deleted 2 of those ones ...
1
vote
2answers
104 views

101 SOQL Queries Limit Exception

Even I think I have bulkified my code still it is throwing SOQL 101 Limit Exception on below code on Line 5 (For loop One). What I am doing Wrong? UserIds is just a list of Oppportunties.OwnerIds ...
8
votes
0answers
75 views

Premature optimization is the…cure of all CPU timeouts?

According to Donald Knuth actually "is the root of all evil". But this doesn't seem to hold true on the Force.com platform and its CPU time Limit. After watching Paul Battisson's Faster Loops ...
0
votes
4answers
78 views

Alternative to write SOQL out of FOR in Batch Apex

I have following trigger executing after record is inserted and calls a batch to process records. In this batch I have few IF conditions to update records. Due to business scenario I have to write ...
3
votes
1answer
61 views

Can I have multiple transactions within 1 Schedulable Class?

I have a Schedulable class that does multiple rollups from my Opportunities to their respective Accounts. This seems to work fine until recently I noticed some issues. Essentially my Schedulable ...
1
vote
0answers
57 views

What are the 10 Principals of Apex Testing? [closed]

How can Apex Code be tested using Mocking testing principles.
5
votes
1answer
125 views

What is a DML Statement?

I know this seems like a really stupid question. But I am still often amazed by the SalesForce platform. Consider the following test: static testMethod void testLimitDmlStatements() { SObject ...
0
votes
1answer
49 views

SOQL Implications of Using Declarative Lookup Rollup Summaries

I am a big proponent of using Andrew Fawcett's Declarative Lookup Rollup Summaries tool. However, I need to have a better understanding of how it affects my governor limits. Specifically, I have an ...
2
votes
1answer
81 views

Apex heap size error - VF dowloading attachments

I have one VF page from where I am trying to download some attachments - The time I tried to download attachments which includes Attachments of size 4 MB+ size, it start showing me this error. ...
5
votes
1answer
150 views

CPU timeout in production org due to strange waiting lags cannot be reproduced in slow DE org

Our managed package runs into CPU timeouts in a customer production which we tried to reproduce in our DE packaging org. We added some of the custom workflows, formulas and rollups but where unable ...
1
vote
1answer
108 views

Web-To-Lead throwing ConcurrentPerOrgApex Limit error

We are getting ConcurrentPerOrgApex Limit error on some of the Web-To-Lead creations. It used to occur rarely before but has become more frequent now, have had 3 of such incidents in the past week. ...
0
votes
1answer
373 views

concurrent request limit exceeded

I am getting below eroor intermittently. I know the reason for this error as I read on docs but could not find out what I am supposed to do to avoid it, what might be the resolution. Error - ...
5
votes
1answer
273 views

How do governing limits work with @testSetup from Spring 15' release

The new @testSetup method is covered pretty well by Jesse Altman in his: New Spring ’15 Feature: @testSetup article but as mentioned in the comments, there is a question about how this new feature ...
0
votes
2answers
117 views

I get System.LimitException: Too many query rows: 50001 when querying via a static method in a different class but not if querying from the same class

I understand this exception. But what I don't understand is this: THIS APPROACH WORKS: public List<String> optionType { get { if (optionType == null) { ...
3
votes
2answers
250 views

Apex Email Limits Clarification

I need to send a (potentially large) number of emails to (community) users via code using an Email Template, with a custom object as the whatId. Because my whatId is a custom object, I am using ...
0
votes
3answers
243 views

CUMULATIVE_LIMIT_USAGE & CUMULATIVE_LIMIT_USAGE_END - Too many SOQL queries

We are getting 'Too many SOQL queries' on execution of Triggers on Account. We are using lot of Managed packages.I am trying to debug a single test method to start with. I am looking at the debug ...
3
votes
1answer
78 views

How can I create over 10,000 records with information from Visualforce?

I have an inventory input page that I am working on and I am running into an issue where I need to create more than 10k records. The problem here is that all the information needed is not stored in an ...
1
vote
1answer
47 views

How can I get a list of existing cross-object references without hitting the limit?

I am auditing our org - I'm aware that we're close to the cross-object reference limit on OppLineItem and Asset because we've hit it before, but have been able to rationalise various rules, formulas ...
5
votes
2answers
78 views

Test.StopTest Not Resetting Limits?

I have a test running in API Version 29. I am actively testing against governor limits and I think I am running into a bug. My test has the following sequence: //setup Test.startTest(); // ...
0
votes
1answer
60 views

Convert trigger to apex class

I have two custom objects. The first stores transactional data with a externally generated customer ID. The second custom object maps this customer ID to a salesforce account ID. I'm trying to find ...
1
vote
1answer
98 views

System.LimitException occurs in WSDL Class

I'm getting System.LimitException: Too many callouts: 101 error message in my WSDL class file generated by SFDC. Repeated error was shown as following: ...
2
votes
1answer
93 views

Does the query cursor limit matter if I'm only returning a single row?

I'm using the Salesforce SOAP API on our website. I am only using it for read operations on a table with around 50,000 records, however I only return one or two rows from the table (which I am ...
2
votes
1answer
77 views

Does a 304 response count toward api-usage count?

When making an API call with If-Modified-Since header - if the response returns with a 304-Not Modified will that use one of my call allocation? Also can the If-Modified-Since if supplied in a list ...
1
vote
1answer
205 views

Batch Apex Governor Limit and Managed Package

If a certified managed package initiates batch apex, does it come under governor limits of native org for batch apex? e.g. per documentation: The maximum number of asynchronous Apex method ...
1
vote
1answer
59 views

skip duplicate records

Scenario: 500 records of contacts will be getting to endpoint 'https://nurtureapi.nurturehq.com/sfdc/contacts' Which i want to insert this part i have done. if next time same contacts are found then ...
3
votes
0answers
104 views

Batch performance impact of Database.Stateful

I know that a Batch will generally run faster when the Database.Stateful marker interface is not used. What I don't know is, how badly the serializing and deserializing of state between each execute ...
0
votes
0answers
295 views

Too many DML statements: 151 - no DML in a for loop (that I can see)

I'm trying to build a newsletter manager that allows users to easily update and clear newsletter campaign members based on their subscription and region without having to run multiple reports. I've ...
0
votes
1answer
34 views

Error using Limits class

Following is the code where Salesforce is showing error: "Compile Error: Variable does not exist: Limits" if(updatedContacts.size() + Limits.getDMLRows() > Limits.getLimitsDMLRows()) { // ...
0
votes
2answers
37 views

Error: Creating a Formula field referencing another Formula field

I'm using the following formula in order to show color coding: And the content of CS_CaseAge__c are as: IF(ISNULL(ClosedDate), (FLOOR(( NOW()- CreatedDate)*24)) + ROUND(((( ((Now() - ...
-2
votes
1answer
58 views

Batch Apex Doubt

Im writing a Batch APEX prgoram. The program works but it doesnt follow Governor Limits since I have used select statements inside for loop. The data in the 2 Objects is as follows. Object 1: Id ...
8
votes
1answer
108 views

What does Limits.getAggregateQueries() represent?

Per the Limits class documentation, there are a pair of methods for "aggregate queries": getAggregateQueries() Returns the number of aggregate queries that have been processed with any SOQL ...
0
votes
1answer
310 views

Heap size limit when uploading file using Visualforce page

I have a visualforce page which has control. I am using this to upload a text file. I have property of type Attachment in my controller. Value of inpufile control will be Body of Attachment property. ...
0
votes
0answers
77 views

SOQL: Too many query rows even when only 1 is returned

My question is in addition to the issue described here: System.LimitException: Too many query rows: 50001 What I don't understand is that my query only returns 1 row so how is it possible that I'm ...
2
votes
2answers
59 views

How to manage the cumulative time callout limit?

i searched aroud a solution, but I didn't found someone that already made the question. I'm searching an approach to calculate the value of the cumulative time spent in callouts... I checked the apex ...